Closed (fixed)
Project:
Mailhandler
Version:
6.x-2.x-dev
Component:
Mailhandler
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2012 at 10:35 UTC
Updated:
23 May 2012 at 21:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
BarisW commentedSame here: #1345644: Ctools throwing notices: plugins should be named plugin.class.php
It seems like the plugins should be named .class.php instead of .inc
Bumping this to major
Comment #2
danepowell commentedI'm a little confused... I've certainly never seen this error before, which leads me to believe that it's due to a recent change in Ctools or Feeds. #1345644: Ctools throwing notices: plugins should be named plugin.class.php mentions that the relevant code is in includes/registry.inc, but the Git logs indicate that there haven't been any changes to that file in years...
What versions of Feeds / Ctools are you using? If a dev version, please include the timestamp or version string from the info file (i.e. "7.x-2.4+5-dev"). Also, does this error really break importers, or is it just a notice in the logs?
Comment #3
BarisW commentedWell, the funny thing is that the other plugin are separated into a .inc and a .class.php (see plugins/mailhandler/filters for instance).
If I move the classes from MailhandlerFetcher and MailhandlerParser into their own .class.php file, the notice is gone.
Comment #4
BarisW commentedBy the way: it's a notice in the logs, not an error. If it breaks the import, I'm not sure, as I didn't get it to import at all so far.
I'm trying to import mails from a mailbox as comments. I don't need node imports, only comment imports. But so far, no luck, I was hoping this error/notice was the problem but maybe it's something else.
I'm using Feed 7.x-2.0-alpha4 and Ctools 7.x-1.0-rc1
Comment #5
danepowell commentedRe #3: Yeah, if you look at the Ctools module, you will notice that many of the plugins that it supplies are themselves just .inc files. So it's very weird that it should throw that error.
Since this doesn't seem to break imports, I'm bumping down the priority, but I'll still try to look into it.
Comment #6
danepowell commentedMarked #1542364: Missing retrieval plugins as dupe.
Comment #7
danepowell commentedJust to summarize... I have tried both Mailhandler 7.x-2.4 and 7.x-2.x and cannot recreate this problem. I am using Drupal 7.12 and Ctools 7.x-1.0. The only warning message I see is related to a missing Feeds plugin, but ONLY immediately after enabling Mailhandler quick-start - this is normal and a known bug with Ctools.
This certainly seems like a bug with Ctools, I just can't figure out why it would appear on your sites and not mine.
Comment #8
danepowell commentedI also just tried 7.13-dev but couldn't reproduce this.
Comment #9
danepowell commentedIn support of this being a Ctools bug: #1423364: Plugin date_context_date_condition of type context:plugins points to nonexistent file
I suggest coordinating with the folks in that issue. As far as I can tell, the maintainer was never able to reproduce the problem in that case either, yet many people report having the problem. Unfortunately I don't have time to tackle this myself at the moment.
Comment #10
socialnicheguru commentedi get this when I add the debug flag to crush
"drush cc --debug" for example
WD ctools: Plugin Mailhandler fetcher of plugin type feeds:plugins points to nonexistent file [notice]
mailhandler/plugins/feeds/plugins/MailhandlerFetcher.class.php for class handler handler.
This is in that directory:
MailhandlerFetcher.inc MailhandlerParser.inc
Comment #11
danepowell commentedYeah the thing is I don't know why it's looking for MailhandlerFetcher.class.php - the actual class is included in MailhandlerFetcher.inc. And this should be okay- many other Feeds plugins contain the class in the .inc file.
One other thought- are you on a multisite or single-site installation? What is the full path to the Mailhandler directory? (e.g. /home/socialnicheguru/drupal/sites/all/modules) The issue that I linked to in #9 mentioned that there might be differences between multisite and single-site installations.
Comment #12
Jānis Bebrītis commentedHad to dig trough this. After introducing myself to feeds developer notes http://drupal.org/node/622700 and both module codes I realised that we actually need both files - inc and class.php.
inc file has plugin definitions and class.php - an actual class.
created non-working patch for 7.x-2.x
Comment #13
Jānis Bebrītis commentedmade a boo-boo on patch, this should work for 2.x-dev
Comment #14
danepowell commentedYeah but what I'd like to figure out is *why* some people need the .class.php file, while for other (i.e. me) just the .inc file works just fine. Additionally, many Feeds plugins only have .inc files, so clearly .class.php files aren't required.
Note that the retrieval plugins (in the issue I marked as dupe in #6) *do* have .class.php files, but are still not found for some users. So I'd like to figure out the root cause here before applying any patches.
Comment #15
Jānis Bebrītis commenteddifferent ctools versions? i have 7.x-1.0
ctools/includes/registry.inc, look how it concats ".class.php" to $class_key
Comment #16
Jānis Bebrītis commentedI got it now why my patch wouldn't work - patch doesn't create .class.php files, doh
Comment #17
danepowell commentedOkay, I committed a fix for this:
http://drupalcode.org/project/mailhandler.git/commit/c1f4204
As near as I could tell, this error only occurred on module enable, but did not prevent the Mailhandler Fetcher / Parser from actually working. Perhaps this was due to some recent change or idiosyncrasy in Ctools. At any rate, looking at the most recent Ctools code mentioned in #15, it's clear to me that creating separate .class.php files was the way to go.
I'm going to re-open #1542364: Missing retrieval plugins and tackle that separately.
Comment #18
danepowell commentedThis may or may not cause trouble in 6.x-2.x, but I should probably port the change just so that the two branches can keep the same file structure.
Comment #19
danepowell commentedhttp://drupalcode.org/project/mailhandler.git/commit/2b8abbd
Comment #20.0
(not verified) commentedAdded blockquote element