I'm seeing this Ctool notice in my logs:

Plugin Mailhandler fetcher of plugin type feeds:plugins points to nonexistent file sites/all/modules/contrib/mailhandler/plugins/feeds/plugins/MailhandlerFetcher.class.php for class handler handler.

Any idea what this could be?

Comments

BarisW’s picture

Priority: Normal » Major

Same 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

danepowell’s picture

I'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?

BarisW’s picture

Well, 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.

BarisW’s picture

By 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

danepowell’s picture

Priority: Major » Normal

Re #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.

danepowell’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
danepowell’s picture

Just 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.

danepowell’s picture

I also just tried 7.13-dev but couldn't reproduce this.

danepowell’s picture

In 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.

socialnicheguru’s picture

i 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

danepowell’s picture

Yeah 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.

Jānis Bebrītis’s picture

Had 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

Jānis Bebrītis’s picture

made a boo-boo on patch, this should work for 2.x-dev

danepowell’s picture

Yeah 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.

Jānis Bebrītis’s picture

different ctools versions? i have 7.x-1.0

ctools/includes/registry.inc, look how it concats ".class.php" to $class_key

Jānis Bebrītis’s picture

I got it now why my patch wouldn't work - patch doesn't create .class.php files, doh

danepowell’s picture

Title: Missing MailhandlerFetcher.class.php » Missing Feeds plugins on module enable
Status: Active » Fixed

Okay, 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.

danepowell’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Fixed » Patch (to be ported)

This 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.

danepowell’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added blockquote element