Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The new method for handling missing modules in Drupal 7.50 seems to trigger errors from Omega as well, like these:
User warning: The following theme is missing from the file system: ctools. In order to fix this, put the theme back in its original location. For more information, see the documentation page. i _drupal_trigger_error_with_delayed_logging()
Comment | File | Size | Author |
---|---|---|---|
#13 | omega-modules-listed-as-missing-themes-2762793-13.patch | 4.11 KB | das-peter |
#3 | 2762793-fix-for-modules-listed-as-missing-themes.patch | 1.13 KB | granholm |
Comments
Comment #2
granholm CreditAttribution: granholm at Yle - Finnish Broadcasting Company commentedComment #3
granholm CreditAttribution: granholm at Yle - Finnish Broadcasting Company commentedThis patch will prevent the scan from triggering errors.
Comment #4
stefan.r CreditAttribution: stefan.r commentedIsn't that just hiding the problem? We shouldn't call drupal_get_filename on nonexistent themes to being with, right?
Comment #5
czigor CreditAttribution: czigor at Liip commentedAfter upgrading to 7.50 we are getting this too in a non-reproducible way but always together with
We are using an aurora subtheme. Fences and ctools modules are enabled.
Comment #6
czigor CreditAttribution: czigor at Liip commentedSo my issue was #2765081: Error messages after upgrading to Drupal 7.50 and it got fixed just the same way as the patch in #3. We are not hiding the problem since with that call we are only checking if the file exists or not.
Marking this as RTBC.
Comment #7
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedSo the problem with #3 is that it before 7.50 lead to a system scan for anything missing.
Now it will just lead to a huge missing cache entry for all permutations of things.
I suggest to instead get all installed modules and those namespaces, then all themes and all engines. (from the theme registry).
Comment #8
das-peter CreditAttribution: das-peter at Cando commentedHope I got the idea from @Fabianx right :) Patch attached.
I'm actually not sure what's more expensive to process / maintain - the check of every file and the stall file cache or the collection of all namespaces in advance. Currently I assume it depends on the site installation / pattern usage.
However, it sounds cleaner not to fill the cache with "random" file checks.
Comment #9
das-peter CreditAttribution: das-peter at Cando commentedFound an issue while testing this further.
Theme engines seem not to be tracked in the system table this causes
drupal_get_path()
to use_drupal_get_filename_fallback()
which will log a warning about a moved file.To avoid this I've changed the way how theme engine tokens are detected.
Now the code relies on the theme info and does a file exists check before adding the path.
Comment #10
das-peter CreditAttribution: das-peter at Cando commentedDarn, looks like I'm operating in derp mode - there was another issue. Fixed patch attached.
Comment #11
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedLooks already great. Now that your list is fixed, I would probably cache at least the profiles/ to avoid the file system scan during run-time.
Comment #12
drupov CreditAttribution: drupov commentedNot really aware what is going on, but I load a theme-external css file from a library through
in the html.preprocess.inc of my Omega4 subtheme. This was going great, even with the patch from #3, but this external css stopped loading with the patch from #10.
Comment #13
das-peter CreditAttribution: das-peter at Cando commentedUpdated the patch:
Comment #14
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedNot tested, but this looks great to me! Thanks!
Comment #15
drupov CreditAttribution: drupov commented"Go" from me too with #13!
Thanks!
Comment #16
Bird-Kid CreditAttribution: Bird-Kid commentedBeen seeing the same error message spam since the 7.50 update. #13 worked like a charm. – Thanks!
Comment #17
Chris Burge CreditAttribution: Chris Burge commentedPatch #13 resolved this issue. In my case, I was excluding CSS from a particular module using 'omega_css_exclude', which caused the error message.
Comment #18
aschiwi CreditAttribution: aschiwi at undpaul commentedPatch in #13 worked for me as well. Thank you! The rtbc status was probably a little early in #14, but since I am now the 4th comment and nobody has been having any problems, commit it? <3
Comment #19
criscomPatch in #13 works for me although it partially failed. I had to apply the patch manually.
Comment #20
olli CreditAttribution: olli commentedIs it necessary to scan the entire profiles directory? Would
$profile = drupal_get_profile()
do it? If so, do we need the cache (wrt #11)?Note that the 7.x file_scan_directory() takes only 4 parameters.
Comment #21
ndf CreditAttribution: ndf commentedWe had an issue applying the patch against omega 7.x-4.4 so I rerolled #13. No further changes.please ignore. Unrelated to this issue :)Comment #22
ndf CreditAttribution: ndf commented