Recently the following code in this issue has been committed to CTools dev: #742832: ctools_plugin_load_includes() can set cache on every request.

That code allowed for better caching of CTools plugins.

Despite the beneficial improvements in page speed there is a bug I noticed with this code commit that is causing issues with the Menu Blocks module. Once that patch is applied and I use menu block ctools plugin and I change form_state I get the following errors:

[error] [client 192.168.33.1] PHP Fatal error:  Call to undefined function menu_block_configure_form_follow_validate() in /mnt/www/html/drupal-7.x-4.x/includes/form.inc on line 1459, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP Stack trace:, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   1. {main}() /mnt/www/html/drupal-7.x-4.x/index.php:0, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   2. menu_execute_active_handler() /mnt/www/html/drupal-7.x-4.x/index.php:33, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   3. call_user_func_array() /mnt/www/html/drupal-7.x-4.x/includes/menu.inc:517, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   4. panopoly_magic_ajax_form_callback() /mnt/www/html/drupal-7.x-4.x/includes/menu.inc:0, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   5. ctools_content_form() /mnt/www/html/drupal-7.x-4.x/profiles/wetkit/modules/contrib/panopoly_magic/panopoly_magic.module:80, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   6. ctools_wizard_multistep_form() /mnt/www/html/drupal-7.x-4.x/profiles/wetkit/modules/contrib/ctools/includes/content.inc:591, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   7. drupal_build_form() /mnt/www/html/drupal-7.x-4.x/profiles/wetkit/modules/contrib/ctools/includes/wizard.inc:125, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   8. drupal_process_form() /mnt/www/html/drupal-7.x-4.x/includes/form.inc:385, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP   9. drupal_validate_form() /mnt/www/html/drupal-7.x-4.x/includes/form.inc:889, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP  10. _form_validate() /mnt/www/html/drupal-7.x-4.x/includes/form.inc:1183, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP  11. _form_validate() /mnt/www/html/drupal-7.x-4.x/includes/form.inc:1345, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content
[error] [client 192.168.33.1] PHP  12. _form_validate() /mnt/www/html/drupal-7.x-4.x/includes/form.inc:1345, referer: http://drupaltest:8080/en/admin/structure/mini-panels/list/wetkit_mini_panels_drupal_wcms/edit/content

If i revert the code applied in the issue mentioned above, this bug no longer occurs.

I have found an issue that perhaps highlights the issue I am having albeit for menu blocks themselves (not the menu block ctools plugin) #1596244: block_configure hook does not allow form_state to be altered, which is problematic when modules use includes

I was wondering if anyone would have suggestions on how to mitigate this issue for the menu block ctools plugin?

Comments

sylus’s picture

Issue summary: View changes
sylus’s picture

Issue summary: View changes
sylus’s picture

Title: Bug with ctools_plugin_load_includes() can set cache on every request » Regression with ctools_plugin_load_includes() can set cache on every request
dsnopek’s picture

Here's a patch that fixes this for menu_block:

#2418803: Fatal error when using with CTools 1.6 and Panels 3.5

I'm not sure how many modules were broken by this change, but I suspect a similar fix will work for them as well.

sylus’s picture

Patch works for me. Should I close this issue or leave it open as a placeholder for other possible regressions in other modules?

rivimey’s picture

Status: Active » Closed (duplicate)