Hi,
I just created my first test using :
- condition -> String: URL path
- variant based on path mutation
- success condition -> form submit
When i visit the url of either my original (defined in the condition path) or variant 1, i get 'Fatal error: Call to undefined function list_themes() in /var/www/sites/all/modules/contrib/ctools/includes/plugins.inc on line 551 '.
The stacktrace shows me that the culprit is multivariate_boot(), calling multivariate_get_running_tests(), which calls some ctools functions too soon i guess...?
So yeah, tests aren't running for me in this setup.
Comments
Comment #1
pieterdt commentedso, a solution that checks the availability of the ctools function before calling it seems to solve the fatal error:
But then the A/B testing doesn't get triggered ever anymore.
Removing the condition, then lets the test work, but once cache is cleared, the fatal error returns.
making sure that the module weight of the multivariate modules is higher then those of ctools doesn't solve the issue.
So what seems to be the case:
Comment #2
pivica commentedSeems to me that Drupal core includes/theme.inc is not loaded and function list_themes(), from that file, is called.
Try to find out who is calling that list_themes() first - I see it is called from _ctools_list_themes() but who call it?
If you can copy&paste whole stack trace error infos here so I can take a look.
Note that multivariate has a lot of problems when it is running - because it need to do a lot of stuff before full Drupal bootstrap. Check multivariate_initialize_drupal() that is doing Drupal initialization for running tests. Maybe there we are missing theme.inc include for else scope?
Comment #3
decipheredFor the site I'm working on the issue is due to a CTools plugin being checked after via the Multivariate hook_boot(), so after Multivariates bootstrap alternative. The plugin checks against list_theme() but Multivariate doesn't include the two files needed for this function to run.
There are a variety of files not being included via Multivariates bootstrap alternative, but the attached patch only includes the two to deal with this issue.
Comment #4
decipheredUpdating title as per #2059561: Some contribs need core file.inc included in boot phase
Comment #5
RecursiveMeta commentedI was receiving the error and I applied the patch successfully.
#3 fix_list_themes-1949122-3.patch solved the error for me.
Comment #6
QB89Dragon commentedI am also affected by this issue and the patch worked. Can we apply this upstream to ensure that future updates don't take down my site? I hit the white page of doom if this isn't applied.
Comment #7
decipheredSomeone (not the creator of the patch) needs to review the patch (confirm it works and doesn't break things) then mark this issue as RTBC.
Comment #8
bisonbleu commentedI reported a similar issue. I was getting a fatal error when saving a test on a clean Drupal 7.42 install (Simplytest.me). The patch in #3 fixes this issue. Setting to RTBC.
Note: without this patch, Multivariate is broken.
Thanks @Deciphered!