To be able to get rid of the ctools dependency it would help to remove the ctools_include out of views_include.

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new926 bytes

Here is the patch, nothing special.

tim.plunkett’s picture

Issue tags: +VDC

Tagging.

bojanz’s picture

Looks good.

merlinofchaos’s picture

I suppose it's too much to ask to try and get a drupal_include() function into core that's smarter that module_load_include(), eh? :)

dawehner’s picture

I really like the idea, i will open an issue for that.

#1604942: Create a drupal_include similar to ctools_include

manuel garcia’s picture

Status: Needs review » Needs work

Patch applied cleanly:

manuel@manuel-laptop:~/htdocs/drupal8/sites/all/modules/views$ git apply -v 1602534-remove-ctools-include.patch
Checking patch views.module...
Applied patch views.module cleanly.

However, after attempting to clear the cache, I got WSOD. Here is the error log:

[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/home/manuel/htdocs/drupal8/sites/all/modules/views/includes/theme.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /home/manuel/htdocs/drupal8/sites/all/modules/ctools/ctools.module on line 113, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   1. {main}() /home/manuel/htdocs/drupal8/index.php:0, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   2. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /home/manuel/htdocs/drupal8/index.php:46, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   3. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/HttpKernel/HttpKernel.php:72, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   4. Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/HttpKernel/HttpKernel.php:133, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   5. Symfony\\Component\\EventDispatcher\\EventDispatcher->doDispatch() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/EventDispatcher/EventDispatcher.php:53, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   6. call_user_func() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/EventDispatcher/EventDispatcher.php:164, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   7. Drupal\\Core\\EventSubscriber\\ViewSubscriber->onView() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/EventDispatcher/EventDispatcher.php:0, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   8. Drupal\\Core\\EventSubscriber\\ViewSubscriber->onHtml() /home/manuel/htdocs/drupal8/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php:52, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP   9. drupal_render_page() /home/manuel/htdocs/drupal8/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php:114, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  10. drupal_render() /home/manuel/htdocs/drupal8/core/includes/common.inc:5695, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  11. theme() /home/manuel/htdocs/drupal8/core/includes/common.inc:5830, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  12. theme_get_registry() /home/manuel/htdocs/drupal8/core/includes/theme.inc:860, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  13. call_user_func_array() /home/manuel/htdocs/drupal8/core/includes/theme.inc:278, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  14. _theme_load_registry() /home/manuel/htdocs/drupal8/core/includes/theme.inc:0, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  15. Drupal\\Core\\Utility\\ThemeRegistry->__construct() /home/manuel/htdocs/drupal8/core/includes/theme.inc:337, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  16. Drupal\\Core\\Utility\\ThemeRegistry->initializeRegistry() /home/manuel/htdocs/drupal8/core/lib/Drupal/Core/Utility/ThemeRegistry.php:48, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  17. theme_get_registry() /home/manuel/htdocs/drupal8/core/lib/Drupal/Core/Utility/ThemeRegistry.php:64, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  18. call_user_func_array() /home/manuel/htdocs/drupal8/core/includes/theme.inc:278, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  19. _theme_load_registry() /home/manuel/htdocs/drupal8/core/includes/theme.inc:0, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  20. _theme_build_registry() /home/manuel/htdocs/drupal8/core/includes/theme.inc:327, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  21. _theme_process_registry() /home/manuel/htdocs/drupal8/core/includes/theme.inc:579, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  22. views_theme() /home/manuel/htdocs/drupal8/core/includes/theme.inc:427, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  23. views_include() /home/manuel/htdocs/drupal8/sites/all/modules/views/views.module:64, referer: http://drupal8/admin/config/development/performance
[Fri Jun 15 17:20:00 2012] [error] [client 127.0.0.1] PHP  24. ctools_include() /home/manuel/htdocs/drupal8/sites/all/modules/views/views.module:1008, referer: http://drupal8/admin/config/development/performance
manuel garcia’s picture

The Fatal error apparently is trigged in line 113 of ctools.module, which reads as follows:

require_once DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "$dir$file.inc";
As part of the ctools_include function.

manuel garcia’s picture

I did a search views for calls for ctools_include:

grep -nHIirF -- ctools_include (in directory: /home/manuel/htdocs/drupal8/sites/all/modules/views)
./views.module:64:  ctools_include('theme', 'views', 'theme');
./views.module:1013:  ctools_include($file, 'views');
./views.module:1026:  ctools_include('plugins');
./views.module:1040:  ctools_include('plugins');
./views.module:1377:  ctools_include('export');
./views.module:1507:  ctools_include('export');
./views.module:1928:  ctools_include('dependent');
./modules/field/views_handler_field_field.inc:451:    ctools_include('fields');
./handlers/views_handler_field_math.inc:44:    ctools_include('math-expr');
./includes/ajax.inc:224:  ctools_include('dependent');
./includes/view.inc:2228:    ctools_include('export');
./includes/admin.inc:305:  ctools_include('dependent');
./includes/admin.inc:987:  //   - Update ctools_include() to support cached forms, or else use
./includes/admin.inc:1000:  ctools_include('dependent');
./includes/admin.inc:4082:  ctools_include('dependent');
./drush/views.drush.inc:221:    ctools_include('object-cache');
./plugins/views_plugin_style_summary_jump_menu.inc:118:    ctools_include('jump-menu');
./plugins/views_plugin_style_jump_menu.inc:134:    ctools_include('jump-menu');
./views_ui.module:270:  ctools_include('object-cache');
./views_ui.module:311:  ctools_include('object-cache');
./views_ui.module:537:  ctools_include('plugins');
./views_ui.module:563:  ctools_include('plugins');
Search completed with 22 matches.
manuel garcia’s picture

Status: Needs work » Needs review
StatusFileSize
new926 bytes

The problem (I think) was that the new views_include function had a call to ctools_include in it in the previous patch.

I removed that call and the WSOD is gone.

Status: Needs review » Needs work

The last submitted patch, views-1602534-9.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new739 bytes

This is the last patch which is missing beside the actual subsystems which will dissappear as well.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

This could have been in #1742858: Remove #dependency out of the filter, but looks good now.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Absolutely but i totally forgot that

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