Repeatable: Yes
Steps to repeat:
1. Update Drupal Core to 7.50.
2. Run the latest version of FEL.
3. Use drush to clear caches.
Expected results:
cache clears with no warnings
Actual results:
Warning appears: "The following module is missing from the file system: field_collection_table. In order to fix this, put the module back in its original location. For more information, see the documentation page. bootstrap.inc:1128"
Proposed resolution:
Test for the field_collection_table before attempting to use it. Creates a new variable $fct_include and refers to that variable when field_collection_table module is called. Patch attached in first comment.
Comments
Comment #2
tsewa commentedComment #3
azinck commentedYep, this is definitely a problem. tsewa's patch should work, but I took a different approach to avoid registering what will effectively be a non-functional theme function. No interdiff due to the simplicity of the patch and the different approach.
Comment #4
kaareThe solutions here seems to be one-off for the Field Collection Table module, though I see no reason not to check for other modules as well. As a benefit the theme registry becomes less cluttered.
Suggested patch attached. Please test.
Comment #5
kaareSorry. Patch was created in wrong order. This is the correct one.
Comment #6
azinck commented@kaare I have no issue with pulling these other ones out of the theme registry, but the reason we wrote the code as a one-off for the Field Collection Table module is because it's the only one that actually attempts to include a file from the (possibly missing) module.
This change removes the fel_ prefix from the keys for all of these entries...are we sure you're not colliding with any other keys with that change? Also, the relevant theme functions need their names updated if you're going to do that (theme_fel_fields_socialfield_drag_components(), theme_fel_fields_collection_table(), etc) and any relevant usages need updating.
And I'd argue this is a breaking API change as any other modules that either modify these (hook_theme_registry_alter) or use these theme functions will now break.
Given all of this, I think you should avoid renaming the keys.
Comment #7
kaareThat's a totally valid reason.
Otherwise, no theme key are renamed here. Only modules not enabled are filtered out. If you
dpm()the resulting theme, and compare it with the theme returned prior to this patch, the end result is the same, only with the disabled/missing modules' theme overrides removed. thefel_prefix is still there.I have no strong opinion here. Maybe my solution is over-engineered. I really liked the cleanliness/readability of your patch, so I might just go for it :-)
Comment #8
azinck commentedAh, I didn't read your patch carefully -- I see what you did there. Sorry about that! Looks good to me; and your patch is good defensive coding.
Comment #10
kaareAight. Consensus reached :-)
Comment #12
3magnus commentedI've just replaced Fel with the latest dev version (7.x-1.0-beta2+35-dev), cleaned caches and run update script. Warning is displayed again at the Review updates step.
Any thoughts?
Comment #13
kaareI failed to reproduce this. Could you mix up a recipe where I'm able to trigger this?
Steps I did now was:
Still couldn't reproduce any warnings/errors.
Comment #14
3magnus commentedHi @kaare. Here's the recipe:
I think that's all the info.
Comment #15
yce commentedThe problem is with the drupal_get_path(), it doesn't matter whether you add the theme definitions or not, the drupal_get_path() always gets called.
So by checking the existence of the module and then calling the drupal_get_path() solves the issue.
I've created an updated patch. This should take care of the warning.
Comment #17
kaareThx @yce for catching this!
Comment #18
djpable commentedMay we have a patch to apply https://www.drupal.org/project/fel/releases/7.x-1.0-beta2 ?
Or a new release ?
Thank you
Comment #21
mqanneh