After updating the module from 7.x-2.0 to 7.x-2.1 and running the db update I get the following errors:
Notice: Undefined index: draggableviews_hierarchy_handler_native in draggableviews_get_handler_class() (Row 273
Warning: get_class() called without object from outside a class in draggableviews_get_hierarchy_handlers() (Row 311
Warning: class_parents() [function.class-parents]: object or string expected in draggableviews_get_hierarchy_handlers() (Row 311
Warning: in_array() expects parameter 2 to be array, boolean given in draggableviews_get_hierarchy_handlers() (Row 311
Views seem to work nevertheless.
Temporary Workaround
Installing the 7.x-2.1 code, then clearing the cache twice should fix this problem. This will force ctools to add the draggableviews_hierarchy_handler and draggableviews_hierarchy_handler_native class into the system table. THEN run updatedb
Comment | File | Size | Author |
---|---|---|---|
#23 | warnings_2_0_to_2_1_upgrade-2446357-23.patch | 1.41 KB | iStryker |
Comments
Comment #1
iStryker CreditAttribution: iStryker commentedHmm...have not been able to reproduce yet. Errors are happening in draggableviews.module. Line 258-316 has 4 functions that uses the ctools plugin.
Something tells me this is a caching issue. Could be a problem just with hierarchy.
Possible workaround for now: just clear your cache, then you should be good.
If you are getting this error, please leave a comment below.
Comment #2
OMD CreditAttribution: OMD commentedI'm getting similar errors when running database update:
Notice: Undefined index: draggableviews_hierarchy_handler_native in draggableviews_get_handler_class() (line 273 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Warning: get_class() called without object from outside a class in draggableviews_get_hierarchy_handlers() (line 311 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Warning: class_parents(): object or string expected in draggableviews_get_hierarchy_handlers() (line 311 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Warning: in_array() expects parameter 2 to be array, boolean given in draggableviews_get_hierarchy_handlers() (line 311 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Notice: Undefined index: draggableviews_hierarchy_handler_native in draggableviews_get_handler_class() (line 273 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Warning: get_class() called without object from outside a class in draggableviews_get_hierarchy_handlers() (line 311 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Warning: class_parents(): object or string expected in draggableviews_get_hierarchy_handlers() (line 311 of /var/www/vhosts/christopheroxner.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Warning: in_array() expects parameter 2 to be array, boolean given in draggableviews_get_hierarchy_handlers() (line 311 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/draggableviews/draggableviews.module).
Comment #3
Tregonia CreditAttribution: Tregonia commentedI also am expereincing this issue on running drush updb.
[warning]
get_class() called without object from outside a class draggableviews.module:311
[warning]
class_parents(): object or string expected draggableviews.module:311
[warning]
in_array() expects parameter 2 to be array, boolean given draggableviews.module:311
[warning]
get_class() called without object from outside a class draggableviews.module:311
[warning]
class_parents(): object or string expected draggableviews.module:311
[warning]
in_array() expects parameter 2 to be array, boolean given draggableviews.module:311
[warning]
get_class() called without object from outside a class draggableviews.module:311
[warning]
class_parents(): object or string expected draggableviews.module:311
[warning]
in_array() expects parameter 2 to be array, boolean given draggableviews.module:311
[warning]
get_class() called without object from outside a class draggableviews.module:311
[warning]
class_parents(): object or string expected draggableviews.module:311
[warning]
in_array() expects parameter 2 to be array, boolean given draggableviews.module:311
draggableviews module :
7101 - Upgrades the draggableviews_structure table from 1.x to 2.x (schema_version 7200). This will run if you have 7.x-1.x installed and are upgrading to 7.x-2.x. Otherwise this will be skipped. All of your views will need to be manually updated using the Views UI. Backup your data before you run this!
7201 - Increase sizes of view_name and view_display fields of draggableviews_structure table.
7202 - Add "parent" field to draggableviews_structure table.
7203 - Add indexes to the draggableviews_structure table.
7204 - Add indexes to the draggableviews_structure table.
7205 - Remove unique key on the draggableviews_structure table.
Comment #4
behindthepage CreditAttribution: behindthepage commentedThis was extremely problematic with MongoDB cache enabled. I had WSOD with a 503 error.
To solve it I had to edit the system table and disable all the mongodb and draggable views modules. Delete the draggable views module (this may not have been needed), edit the settings file and comment out all the MongoDB config settings and empty all the cache tables.
Once the site came back I uploaded the Draggable views module and enabled it then set up MongoDB again.
So I can confirm this is a cache issue.
Maybe it would be a good idea to clear all the caches in the install file using drupal_flush_all_caches()
BTW Thanks for the great module. I use it a lot. My clients like how easy it is to reorder lists of things.
Regards
Geoff
Comment #5
iStryker CreditAttribution: iStryker commentedI have no problem putting a drupal_flush_all_caches(), just need to know where. Which update hook is cause the problems.
I believe everyone who has comment so far are doing a 7.x-2.0 to 7.x-2.1 upgrade, not 7.x-1.x to 7.x-2.1 so we should be able to count out 7101.
Comment #6
adam_bearI don't know about 1.x, but it breaks from 2.0... I got an identical message to OMD's.
Undefined index: draggableviews_hierarchy_handler_native in draggableviews_get_handler_class() (line 273 ...
Comment #7
iStryker CreditAttribution: iStryker commentedSo can everyone confirm, other than @behindthepage, they get the error, but the upgrade stills work?
Comment #8
dave bruns CreditAttribution: dave bruns commentedI just ran into this on a local site while testing something else. I was upgrading a handful of other modules and draggableviews from 2.0 to 2.1 using drush ups. Here is the output I got in the terminal below (other module chatter removed). The site seems to be running OK despite the errors and draggableviews seems to work. Let me know if you want more info.
Comment #9
4kant CreditAttribution: 4kant commentedThis is what I get after updateing to 7.x-2.1:
Fatal error: Class 'draggableviews_hierarchy_handler' not found in .../sites/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc on line 15
Comment #10
bryanhidalgo CreditAttribution: bryanhidalgo commentedI got the same error when running update.php:
Warning: class_parents(): object or string expected in draggableviews_get_hierarchy_handlers() (
Comment #11
oheller CreditAttribution: oheller commentedI get these errors when I run drush updb with: Admin_menu, Better_exposed_filters
Ctools, Context, DraggableViews, Entity API, Features, jQuery_update, Menu_block, Module_filter, Token, Views, Webform, Workbench Moderation, and XML Sitemap.
Everything is ok then:
Performed update: draggableviews_update_7203 [ok]
SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.id' in 'field list' [error]
Performed update: webform_update_7420 [ok]
Performed update: workbench_moderation_update_7009 [ok]
PHP Fatal error: Class 'draggableviews_hierarchy_handler' not found in /var/www/vop/qa/docroot/site
s/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc on line 15
PHP Stack trace:
PHP 1. {main}() /usr/share/pear/drush/drush.php:0
PHP 2. drush_main() /usr/share/pear/drush/drush.php:16
PHP 3. _drush_bootstrap_and_dispatch() /usr/share/pear/drush/drush.php:61
PHP 4. drush_dispatch() /usr/share/pear/drush/drush.php:92
PHP 5. call_user_func_array() /usr/share/pear/drush/includes/command.inc:165
PHP 6. drush_command() /usr/share/pear/drush/includes/command.inc:165
PHP 7. _drush_invoke_hooks() /usr/share/pear/drush/includes/command.inc:198
PHP 8. call_user_func_array() /usr/share/pear/drush/includes/command.inc:324
PHP 9. drush_core_updatedb_batch_process() /usr/share/pear/drush/includes/command.inc:324
PHP 10. _update_batch_command() /usr/share/pear/drush/commands/core/core.drush.inc:1100
PHP 11. drush_batch_command() /usr/share/pear/drush/commands/core/drupal/update_7.inc:246
PHP 12. _drush_batch_command() /usr/share/pear/drush/includes/batch.inc:93
PHP 13. _drush_batch_worker() /usr/share/pear/drush/commands/core/drupal/batch.inc:99
PHP 14. call_user_func_array() /usr/share/pear/drush/commands/core/drupal/batch.inc:149
PHP 15. drush_update_do_one() /usr/share/pear/drush/commands/core/drupal/batch.inc:149
PHP 16. module_filter_update_7200() /usr/share/pear/drush/commands/core/drupal/update_7.inc:73
PHP 17. menu_rebuild() /var/www/vop/qa/docroot/sites/all/modules/module_filter/module_filter.install:35
PHP 18. menu_router_build() /var/www/vop/qa/docroot/includes/menu.inc:2722
PHP 19. drupal_alter() /var/www/vop/qa/docroot/includes/menu.inc:2762
PHP 20. views_menu_alter() /var/www/vop/qa/docroot/includes/module.inc:1101
PHP 21. view->execute_hook_menu() /var/www/vop/qa/docroot/sites/all/modules/views/views.module:400
PHP 22. views_plugin_display_page->execute_hook_menu() /var/www/vop/qa/docroot/sites/all/modules/views/includes/view.inc:1456
PHP 23. view->init_handlers() /var/www/vop/qa/docroot/sites/all/modules/views/plugins/views_plugin_display_page.inc:60
PHP 24. view->_init_handler() /var/www/vop/qa/docroot/sites/all/modules/views/includes/view.inc:674
PHP 25. views_plugin_display->get_handlers() /var/www/vop/qa/docroot/sites/all/modules/views/includes/view.inc:759
PHP 26. views_get_handler() /var/www/vop/qa/docroot/sites/all/modules/views/plugins/views_plugin_display.inc:960
PHP 27. _views_prepare_handler() /var/www/vop/qa/docroot/sites/all/modules/views/views.module:1257
PHP 28. _views_create_handler() /var/www/vop/qa/docroot/sites/all/modules/views/includes/handlers.inc:87
PHP 29. draggableviews_handler_field_draggable->construct() /var/www/vop/qa/docroot/sites/all/modules/views/includes/handlers.inc:65
PHP 30. views_handler_field->construct() /var/www/vop/qa/docroot/sites/all/modules/draggableviews/views/draggableviews_handler_field_draggable.inc:13
PHP 31. views_object->construct() /var/www/vop/qa/docroot/sites/all/modules/views/handlers/views_handler_field.inc:67
PHP 32. views_object->set_default_options() /var/www/vop/qa/docroot/sites/all/modules/views/includes/base.inc:61
PHP 33. draggableviews_handler_field_draggable->option_definition() /var/www/vop/qa/docroot/sites/all/modules/views/includes/base.inc:77
PHP 34. draggableviews_get_handlers() /var/www/vop/qa/docroot/sites/all/modules/draggableviews/views/draggableviews_handler_field_draggable.inc:29
PHP 35. ctools_get_plugins() /var/www/vop/qa/docroot/sites/all/modules/draggableviews/draggableviews.module:286
PHP 36. ctools_plugin_load_includes() /var/www/vop/qa/docroot/sites/all/modules/ctools/includes/plugins.inc:276
PHP 37. require_once() /var/www/vop/qa/docroot/sites/all/modules/ctools/includes/plugins.inc:475
Fatal error: Class 'draggableviews_hierarchy_handler' not found in /var/www/vop/qa/docroot/sites/all
/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc on line 15
Call Stack:
0.0004 692000 1. {main}() /usr/share/pear/drush/drush.php:0
0.0204 4813360 2. drush_main() /usr/share/pear/drush/drush.php:16
0.1702 10716392 3. _drush_bootstrap_and_dispatch() /usr/share/pear/drush/drush.php:61
0.2977 16408312 4. drush_dispatch() /usr/share/pear/drush/drush.php:92
0.3885 16994032 5. call_user_func_array() /usr/share/pear/drush/includes/command.inc:165
0.3885 16994456 6. drush_command() /usr/share/pear/drush/includes/command.inc:165
0.3891 16995008 7. _drush_invoke_hooks() /usr/share/pear/drush/includes/command.inc:198
0.3917 17059216 8. call_user_func_array() /usr/share/pear/drush/includes/command.inc:324
0.3918 17059640 9. drush_core_updatedb_batch_process() /usr/share/pear/drush/includes/command.inc:324
0.3967 17615528 10. _update_batch_command() /usr/share/pear/drush/commands/core/core.drush.inc:1100
2.2098 78406584 11. drush_batch_command() /usr/share/pear/drush/commands/core/drupal/update_7.inc:246
2.2123 78490160 12. _drush_batch_command() /usr/share/pear/drush/includes/batch.inc:93
2.2126 78496248 13. _drush_batch_worker() /usr/share/pear/drush/commands/core/drupal/batch.inc:99
16.1875 115464288 14. call_user_func_array() /usr/share/pear/drush/commands/core/drupal/batch.inc:149
16.1875 115464336 15. drush_update_do_one() /usr/share/pear/drush/commands/core/drupal/batch.inc:149
16.1879 115466128 16. module_filter_update_7200() /usr/share/pear/drush/commands/core/drupal/update_7.inc:73
16.1879 115466128 17. menu_rebuild() /var/www/vop/qa/docroot/sites/all/modules/module_filter/module_filter.install:35
16.1900 115467040 18. menu_router_build() /var/www/vop/qa/docroot/includes/menu.inc:2722
16.8236 135998408 19. drupal_alter() /var/www/vop/qa/docroot/includes/menu.inc:2762
16.8244 136009448 20. views_menu_alter() /var/www/vop/qa/docroot/includes/module.inc:1101
17.2658 144268352 21. view->execute_hook_menu() /var/www/vop/qa/docroot/sites/all/modules/views/views.module:400
17.2659 144379912 22. views_plugin_display_page->execute_hook_menu() /var/www/vop/qa/docroot/sites/all/modules/views/includes/view.inc:1456
17.2659 144380952 23. view->init_handlers() /var/www/vop/qa/docroot/sites/all/modules/views/plugins/views_plugin_display_page.inc:60
17.2667 144382184 24. view->_init_handler() /var/www/vop/qa/docroot/sites/all/modules/views/includes/view.inc:674
17.2668 144382232 25. views_plugin_display->get_handlers() /var/www/vop/qa/docroot/sites/all/modules/views/includes/view.inc:759
17.2675 144398424 26. views_get_handler() /var/www/vop/qa/docroot/sites/all/modules/views/plugins/views_plugin_display.inc:960
17.2675 144398472 27. _views_prepare_handler() /var/www/vop/qa/docroot/sites/all/modules/views/views.module:1257
17.2675 144399440 28. _views_create_handler() /var/www/vop/qa/docroot/sites/all/modules/views/includes/handlers.inc:87
17.2683 144516280 29. draggableviews_handler_field_draggable->construct() /var/www/vop/qa/docroot/sites/all/modules/views/includes/handlers.inc:65
17.2683 144516280 30. views_handler_field->construct() /var/www/vop/qa/docroot/sites/all/modules/draggableviews/views/draggableviews_handler_field_draggable.inc:13
17.2683 144516280 31. views_object->construct() /var/www/vop/qa/docroot/sites/all/modules/views/handlers/views_handler_field.inc:67
17.2683 144516280 32. views_object->set_default_options() /var/www/vop/qa/docroot/sites/all/modules/views/includes/base.inc:61
17.2684 144516496 33. draggableviews_handler_field_draggable->option_definition() /var/www/vop/qa/docroot/sites/all/modules/views/includes/base.inc:77
17.2684 144546288 34. draggableviews_get_handlers() /var/www/vop/qa/docroot/sites/all/modules/draggableviews/views/draggableviews_handler_field_draggable.inc:29
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'draggableviews_hierarchy_handler' not found in/var/www/vop/qa/docroot/sites/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc,line 15
17.2684 144546448 35. ctools_get_plugins() /var/www/vop/qa/docroot/sites/all/modules/draggableviews/draggableviews.module:286
17.2684 144549016 36. ctools_plugin_load_includes() /var/www/vop/qa/docroot/sites/all/modules/ctools/includes/plugins.inc:276
17.2716 144664680 37. require_once('/var/www/vop/qa/docroot/sites/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc') /var/www/vop/qa/docroot/sites/all/modules/ctools/includes/plugins.inc:475The external command could not be executed due to an application error. [error]
Finished performing updates. [ok]
Comment #12
sergei_semipiadniy CreditAttribution: sergei_semipiadniy commentedI also faced with these notices/warnings and even with fatal error on production instance. Seems it happens due to absence of record with `draggableviews_hierarchy_handler_native` class in system table after module update. By suggestion of my fellow man I ran `drush registry_rebuild` and all things fell into place.
Comment #13
RKopacz CreditAttribution: RKopacz commentedI am persistently getting this error when updating from 2.0 to 2.1:
I've tried a few of the suggestions above, including registry_rebuild, without success.
Comment #14
iStryker CreditAttribution: iStryker commented@RKopacz you should not be get that error anymore because update 7203 has been changed. To a length of 50. Thoses that have have upgraded to 7203, 7204 or 7205, 7206 should fix it.
Comment #15
JCL324I can confirm what @RKopacz reported. Just did a drush up from 2.0 to 2.1 and get the same error. There are now 3 updates that are "stuck":
Draggableviews 7203 Add indexes to the draggableviews_structure table.
Draggableviews 7204 Add indexes to the draggableviews_structure table.
Draggableviews 7205 Remove unique key on the draggableviews_structure table.
Comment #16
JCL324Just updated to the latest dev version and everything is fine.
Comment #17
bwoods CreditAttribution: bwoods at AOL commentedI also updated to the latest dev version (2015-May-06), things seem to be in good order.
Comment #18
controla CreditAttribution: controla commentedI've just updated 3 sites to 2.1 (from 2.0), 1 installed with no problem but 2 of them broke (WSOD) and I'm currently working on fixing them...
updating to dev does not fix the issue yet.
PHP Fatal error: Class 'draggableviews_hierarchy_handler' not found in /var/www/vhosts/****/sites/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc on line 15
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'draggableviews_hierarchy_handler' not found in
/var/www/vhosts/****/sites/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc, line 15
The external command could not be executed due to an application error. [error]
PHP Fatal error: Class 'draggableviews_hierarchy_handler' not found in /var/www/vhosts/****/sites/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc on line 15
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'draggableviews_hierarchy_handler' not found in
/var/www/vhosts/****/sites/all/modules/draggableviews/handlers/draggableviews_hierarchy_handler_native.inc, line 15
The external command could not be executed due to an application error. [error]
Comment #19
iStryker CreditAttribution: iStryker commentedThank you all for your replies. This issue is a little hard to troubleshoot. Especially cause I cannot reproduce this.
@controla comment #18. Looks like ctools has not register the draggableviews_hierarchy_handler class, therefore it fails. Need to look into when this hierarchy class was added. A clear cache before the update should fix this, probably twice. I discovery this when I was using the RESTful module. You register the ctool plugin with a clear cache. The classes associated with the plugin do not get loaded, because ctool registers the classes then the plugins. A second clear cache, loads associated classes.
I like @behindthepage comment #4 comment. We should do a
drupal_flush_all_caches()
, but I just do not know where to put it.From @oheller comment #11, it looks it is unable to run 7204.
From @dave burns comment #8, it looks it is unable to run 7206.
Maybe 7201 is the spot.
Comment #20
iStryker CreditAttribution: iStryker commentedOk look into it more. Handlers in 2.0
draggableviews_handler_native.inc
draggableviews_handler.inc
draggableviews_handler_fieldapi.inc
Additional Handlers in 2.1
draggableviews_hierarchy_handler_native.inc
draggableviews_hierarchy_handler.inc
Which are the 2 handlers giving everyone problems!
Additional Handlers in 2.2
draggableviews_hierarchy_handler_fieldapi.inc (mostlikely)
So whatever the solution is it needs to be done again, or does not have to.
Comment #21
iStryker CreditAttribution: iStryker commentedComment #22
iStryker CreditAttribution: iStryker commentedComment #23
iStryker CreditAttribution: iStryker commentedOk was able to confirm problem. You have to have a draggableviews view cache in 7.x-2.0 and then upgrade. Simply reorder a list then upgrade does this.
So problem is that there is 2 new classes from 7.x-2.0 to 7.x-2.1. When you run drush_flush_cache_all() it causes the problem. I have not figure out completely why, but I think it either tries to cache the draggableviews classes, or cache the views after they are flushed. A draggableviews views tries to load its option definitions of possible draggableviews handlers and draggableviews hierarchy handlers that could be use. It gets a list of handlers and hierarchy handlers. In 7.x-2.1 there are new hierarchy handlers. This is the reason it throws warnings in draggableviews_get_hierachy_handlers.
Attached patch solves this problem, by adding more isset checkers. You can apply it to 7.x-2.1. Currently you can apply it to 7.x-2.x-dev (git version 1.7.9.5), but it complains about a 60 line offset.
Comment #24
DamienMcKennaComment #25
DamienMcKennaComment #26
DamienMcKennaClosed a duplicate: #2545640: DraggableViews does not work after update
Comment #27
iStryker CreditAttribution: iStryker commentedSo no one has tested the patch....if so, please comment
Comment #28
Tschet CreditAttribution: Tschet commentedWhen I test the patch from #23, I get two messages
Notice: Undefined index: draggableviews_hierarchy_handler_native in draggableviews_get_handler_class() (line 273 of /code/sites/all/modules/draggableviews/draggableviews.module).
More specifically, when I try to update from 2.0 to the patched 2.1 version I get those errors.
Comment #29
Cracu CreditAttribution: Cracu commentedIt's the second time when it happens to me, for important modules.
Apparently in some scenarios, files included in .info file are not available right away.
In this case, similar to my own fix for rules module, the fix for fatal errors was to make sure that the missing class is available.
I've added next line in the draggableviews.module file, at start.
Most probably this problem is caused by ctools plugins caches that are not updated or something.
I use it as temporary fix, until a generic solution in core will be available.
Comment #30
rooby CreditAttribution: rooby commentedI am upgrading from 2.0 to 2.1 and I get this error message 4 times.
I have tried with and without the patch at #23 and both times get the same output from drush:
Sorry for the formatting, I couldn't get it to present any better.
Comment #31
mrgoodfellow CreditAttribution: mrgoodfellow commentedI had the same issue, however (after rolling back) I was able to flush the cache BEFORE running update.php and no errors were returned.