How do I correct this Notice?

Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file sites/all/modules/date/date_context/date_context_date_condition.class.php for class handler handler.

Thanks!...

CommentFileSizeAuthor
#9 date_context-1423364-5617992-D7.patch5.76 KBemptyvoid

Comments

socialnicheguru’s picture

I am getting this too. It is not in the official or dev release

socialnicheguru’s picture

Title: Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file » Plugin date_context_date_condition of type context:plugins points to nonexistent file but date_context not in git

date_context is not in the 7.x branch on git but is in both downloads on Drupal.org

karens’s picture

Status: Active » Postponed (maintainer needs more info)

That doesn't make any sense. The downloads have the same files as git has. I just did a fresh checkout of git and a download and got exactly the same files.

There is no file called 'date_context_date_condition.class.php', nor do I have any messages looking for it.

Anyone who is having problems like this should be sure they have the latest code by emptying out the directories and getting a fresh copy of everything. You also need to clear caches.

RyanPrice’s picture

I am getting the same error. Watchdog has the message type as ctools. My message:

Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file sites/all/modules/contrib/date/date_context/date_context_date_condition.class.php for class handler handler.

It may or may not be related, but I am also receiving a fatal error while trying some drush commands. I've pasted it below along with the stack trace. Perhaps this is an issue with views or date_views?

PHP Fatal error: Call to undefined function _views_prepare_handler() in /data/www/doc/apps/sites/all/modules/contrib/views/views.module on line 1146
PHP Stack trace:
PHP 1. {main}() /usr/share/php/drush/drush.php:0
PHP 2. drush_main() /usr/share/php/drush/drush.php:41
PHP 3. drush_dispatch() /usr/share/php/drush/drush.php:101
PHP 4. call_user_func_array() /usr/share/php/drush/includes/command.inc:214
PHP 5. drush_command() /usr/share/php/drush/includes/command.inc:0
PHP 6. _drush_invoke_args() /usr/share/php/drush/includes/command.inc:806
PHP 7. call_user_func_array() /usr/share/php/drush/includes/command.inc:134
PHP 8. drush_cache_clear() /usr/share/php/drush/includes/command.inc:0
PHP 9. drush_op() /usr/share/php/drush/commands/core/cache.drush.inc:76
PHP 10. call_user_func_array() /usr/share/php/drush/includes/drush.inc:1216
PHP 11. drupal_flush_all_caches() /usr/share/php/drush/includes/drush.inc:0
PHP 12. menu_rebuild() /data/www/doc/apps/includes/common.inc:7251
PHP 13. menu_router_build() /data/www/doc/apps/includes/menu.inc:2698
PHP 14. call_user_func() /data/www/doc/apps/includes/menu.inc:2729
PHP 15. views_ui_menu() /data/www/doc/apps/includes/menu.inc:0
PHP 16. views_get_all_templates() /data/www/doc/apps/sites/all/modules/contrib/views/views_ui.module:41
PHP 17. calendar_views_templates() /data/www/doc/apps/sites/all/modules/contrib/views/views.module:1271
PHP 18. date_views_fields() /data/www/doc/apps/sites/all/modules/contrib/calendar/includes/calendar.views_template.inc:30
PHP 19. _date_views_fields() /data/www/doc/apps/sites/all/modules/contrib/date/date_views/date_views.module:63
PHP 20. views_get_handler() /data/www/doc/apps/sites/all/modules/contrib/date/date_views/includes/date_views_fields.inc:56

karens’s picture

I am unable to replicate this issue so there is nothing I can do with it. Try a fresh drupal installation with just Date and Context module. If you see a problem there it should be something I can reproduce. If you don't, there is something else going on, some other module or something about your setup.

loopy1492’s picture

I am getting this too, have been for some time. Every time I cleared my cache or updated my modules, the page would throw a 500 error and this would show up in the log. Fortunately, going back and submitting again would usually work.

Well, today I was trying to install the I had to disable the majority of the Date module in order to run a successful Cache clear. I was trying to install IMCE and the changes wouldn't apply at all. I thought the problem might be the WYSIWYG module, so I disabled that. When the problem continued to happen, I tried reactivating the WYSIWYG module. Just like the IMCE module, the WYSIWYG settings page would not show up.

I poured through my logs and could only come up with these two errors when cache tried to clear:
The file public://ctools/css was not deleted, because it does not exist.

and this when the modules would try to update: or the cache tried to clear:
Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file sites/all/modules/date/date_context/date_context_date_condition.class.php for class handler handler.

So I disabled as much of Date as I possibly could; everything except Date and Date API. I couldn't disable those because fields I have rely on them.

I cleared the cache.

No errors.

WYSIWYG and IMCE showed up in the administration section.

There is something seriously wrong with some part of the Date module. I will try enabling features/clearing cache one at a time until I get an error. Maybe we can narrow this down.

loopy1492’s picture

Status: Postponed (maintainer needs more info) » Active

I thought I had it figured out, but I don't.

emptyvoid’s picture

Confirmed Karen, I deleted the "date" directory and added a clean checkout. Then cleared all of the caches.. errors have not returned.

DOH, nope error has returned.

I also checked out using git and the class file does not exist.


Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file sites/all/modules/contrib/date/date_context/date_context_date_condition.class.php for class handler handler.

date_context.module



15: /**
16: * Implements hook_context_node_condition_alter().
17: */
18: function date_context_context_node_condition_alter($node, $op) {
19:  if ($plugin = context_get_plugin('condition', 'date_context_date_condition')) {
20:    $plugin->execute($node, $op);
21:  }
22: }

In the same file it declares the class and methods for the plugin, perhaps it should be moved into a date_content.date_context_date_condition.inc file instead?

/**
 * Expose term views/term forms by vocabulary as a context condition.
 */
class date_context_date_condition extends context_condition_node {
emptyvoid’s picture

StatusFileSize
new5.76 KB

Patch attached, please review and test if this causes more harm than good.

karens’s picture

Status: Active » Fixed

Committed. Thanks! I had to add the changes to the .info file too, and I moved the new file into a plugins folder, as many of the context modules do.

http://drupalcode.org/project/date.git/commit/983bb2c

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Title: Plugin date_context_date_condition of type context:plugins points to nonexistent file but date_context not in git » Plugin date_context_date_condition of type context:plugins points to nonexistent file
Version: 7.x-2.0-rc1 » 7.x-2.3
Category: bug » support
Status: Closed (fixed) » Needs review

I have encountered the subject error on various installs. The following is a 7.12 core, PHP 5.3.9, with just date, context, and the required ctools, and still get this error. I confirmed my date_context is configured as referenced in http://drupalcode.org/project/date.git/commit/983bb2c

No errors with just core, date, and context installed, but once I attempt to enable date_context, applying the required modules, the error:
"Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file"
appears.

drush en date_context
Initialized Drupal 7.12 root directory at C:/inetpub/wwwroot/drupal_date [notice]
Initialized Drupal site default at sites/default [notice]
Downloading release history from http://updates.drupal.org/release-history/ctools/7.x [notice]
The following projects have unmet dependencies: date_context requires ctools
Would you like to download them? (y/n): y
Downloading ctools-7.x-1.0.tar.gz was successful. [notice]
Project ctools contains 9 modules: views_content, stylizer, page_manager, ctools_plugin_example, ctools_custom_content, ctools_ajax_sample, ctools_access_ruleset, bulk_export, ctools.
Command dispatch complete [notice]

The following extensions will be enabled: date_context, ctools, context
Do you really want to continue? (y/n): y
WD system: ctools module installed. [info]
WD system: ctools module enabled. [info]
WD system: context module installed. [info]
WD system: context module enabled. [info]
WD system: date_context module installed. [info]
WD system: date_context module enabled. [info]
WD ctools: Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file [notice]
sites/all/modules/date/date_context/date_context_date_condition.class.php for class handler handler.
context was enabled successfully. [ok]
ctools was enabled successfully. [ok]
date_context was enabled successfully. [ok]
Command dispatch complete

Regards, Paul

Status: Needs review » Needs work

The last submitted patch, date_context-1423364-5617992-D7.patch, failed testing.

Anonymous’s picture

I'm also receiving this error. Currently I'm trying to use the following modules to create a block/box that contains a calendar of events view:

Date 7.x-2.3+3-dev
Context 7.x-3.0-beta2
Calendar 7.x-3.0+8-dev
Boxes 7.x-1.0-beta7
Views Boxes 7.x-1.0-beta8
Views 7.x-3.3+91-dev

Has anyone been able to figure this out?

tvilms’s picture

Nope. I've got the same Server Error coming up over and over when I try various admin tasks and just general use of my site. I just upgraded to Date v2.5 and I'm getting this. I've disabled Date Context module but doesn't seem to help.

socialnicheguru’s picture

when I add the debug flag to crush I get this:

WD ctools: Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file [notice]
date/date_context/date_context_date_condition.class.php for class handler handler

the only file in that directory is
date_context_date_condition.inc

bjcooper’s picture

subscribing

I'm getting the subject error as well, though I haven't narrowed down what circumstances it shows up in. Whenever, I clear cache, certainly--but not sure if there are others.

cdanni’s picture

Same error.

Core 7.14
Date 7.x-2.5
Ctools 7.x-1.0
Context 7.x-3.0-beta2

I've inherited a rather large project that I'm not completely familiar with, so I'm not even 100% I *need* Date Context, but until I know for sure, I have to leave it enabled. Has anyone come up with a workaround?

catmat’s picture

Same here, visible when using drush -v .

Seems to me that unless a filename is explicitly set, _ctools_registry_files_alter looks for a [name].class.php,
the file here is of form [name].inc and date_context_context_plugins defines the handler without the file parameter.

Possible workaround/fix:

--- modules/date/date_context/date_context.module	2012-04-21 00:38:20.000000000 -0500
+++ modules/date/date_context/date_context.module	2012-05-09 13:22:20.000000000 -0500
@@ -30,6 +30,8 @@ function date_context_context_plugins()
     'handler' => array(
       'class' => 'date_context_date_condition',
       'parent' => 'context_condition_node',
+      'path' => drupal_get_path('module', 'date_context') . '/plugins',
+      'file' => 'date_context_date_condition.inc',
     ),
   );
   return $plugins;
Gyver06’s picture

Hi Catmat, I have tested your solution but unfortunately, it doesn't help. I still have the message "Plugin date_context_date_condition of plugin type context:plugins points to nonexistent file sites/all/modules/date/date_context/date_context_date_condition.class.php for class handler handler."

trumanru’s picture

Version: 7.x-2.3 » 7.x-2.5
Category: support » bug
Priority: Normal » Minor
Status: Needs work » Closed (fixed)

Same problem has been resolved by erasing /sites/all/modules/date and rewriting this directory content.

Carbajo’s picture

Erased Date module folder and reinstalled a fresh copy, no luck, dev module active produces error 500 when clearing caches.

Anonymous’s picture

Priority: Minor » Normal
Status: Closed (fixed) » Active

I can't see how replacing the directory with all the same files should help (and I've made sure by diff'ing: they are the same). We should keep this issue open and not at a low priority, because it tends to flood watchdog list.

@catmat: Your patch addresses the same possible reason I found for this bug. I think the currently discussed issue might be different from the original issue. The plugin in the meantime has moved to it's own folder, so there might be references left to the old location. ctools doesn't seem to know about the plugins-folder in all situations.

@bigMuzzy: Yesterday in one moment I also thought (after clearing caches) the issue is gone. It came back, though. The issue seems to be unsteady somehow. You might wanna report if it comes back?

@Gyver: did you clear caches after patching?

Gyver06’s picture

Yes, shnapoo, I have cleared the cache after patching, I always clear the cache whatever update I do.

Anonymous’s picture

Thanks Gyver. So as a summary, the patch #19 doesn't seem to suffice in all cases. We could need some help of the ctools guys I think.

pjbarry21’s picture

So, patch #19 didn't change anything for me (and I also tried the latest dev version of Date). In my case, it's very specific when this error occurs. I get a white screen of death (WSOD -- in case someone's doing a search on the acronym) and this error in the logs (and only this error) only when a specific VIEW is enabled and then I run update.php. If I hit Ctrl+F5, update.php eventually runs. The view in question has no date fields except a sort order (which I've since removed and no change). But it happens EVERY time. We can rebuild the view from an export or from scratch (it's the same as other views with the exact same settings that give us no problems) and it's fine until it appears we hit some sort of limit on the number of pages within the view (it happens at different numbers of pages with each rebuild of the view). We have plenty of other views created in the past with no issues. We have duplicates of this view with only the number of pages, path and the taxonomy terms being different (for each page -- but all pulling from the same vocabulary) and they have no issues. I've already increased the max execution time and other memory limits -- no change. I'd post this in the Views or ctools issue queue (and may still do that), but I'm posting here first because the only error logged when we see the WSOD is the one that people are reporting here and the only time I get the error is when an "offending" view is enabled (as soon as the view is disabled -- not deleted -- the error and the WSOD disappear).

dhalbert’s picture

I am getting this error recorded in the log ever since I upgraded to Drupal 7.15. However, it seems to cause no problems elsewhere: no WSOD, no HTTP 500 errors, etc. I've cleared out Date and git pulled it to the latest dev release .

EDIT: forgot to say that I see this in the log only when update.php runs, e.g. after upgrading another module

rasor’s picture

I have the same written in my log.
- Core 7.14 (Localized to danish through "Localized Drupal Distribution" from http://drupal.org/project/l10n_install)
- Date 7.x-2.5
- Ctools 7.x-1.0

I have a contenttype with date and termref fields. I see both the date and the termref widgets disappear in create/edit forms until I (fix:) deactivate and reactivate the termref widgets. The problem appears up to several times a day.

I also see the output of some views listing data from that content type disappear until reactivating a termref module.

I used to blame this on the termref widgets, but now I don't know if ctools, date or the widget modules are to blame.
The termref widgets I have used are:
- Autocomplete Deluxe 7.x-1.0-beta7
- Hierarchical Select Taxonomy 7.x-3.0-alpha5
- Term Reference Tree 7.x-1.9
- Hierarchical Term Reference Autocomplete 7.x-1.0-alpha2

Other info: I also have
- Context 7.x-3.0-beta3
installed, but I think I don't use it. I also think the problem began before I installed the module.

Dates often are cause of problems in all systems - especially, when not using american format.

Maybe this can shed some light?

I also would like to know if there is a way to schedule a deactivation/reactivation of modules, when I have only access to the site through the hosts webinterface? (I suppose shell / drush is not possible).

Now you have also made me wonder if reactivating a module flushes the cache - and that might be why things start working. In that way it could be any module I reactivated. I will test that next time.

Thanks in advance from a d7 newbie.

karens’s picture

Status: Active » Fixed

I tried committing the changes in #19. If that's not it, I have no idea. I am absolutely unable to replicate any of these messages and this should be sufficient. Clearing the cache is important, too, because the plugins registry is heavily cached.

http://drupalcode.org/project/date.git/commit/ebedc69

Status: Fixed » Closed (fixed)

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

trumanru’s picture

@Shnapoo: Problem has not been returned.

acidpotato’s picture

I faced the exact same issue last night. Was getting this error on trying to clear class registry cache. Tried to resolve it using suggestions made above but nothing worked. Finally just created an empty php file date_context_date_condition.class.php in the date_context folder and it worked! I could clear the class registry cache. FYI I am not actually using Date Context on my site, so cant comment on what impact this has on the functionality. Hope this helps someone.