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

tsewa created an issue. See original summary.

tsewa’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB
azinck’s picture

Yep, 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.

kaare’s picture

StatusFileSize
new2.79 KB

The 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.

kaare’s picture

StatusFileSize
new2.79 KB

Sorry. Patch was created in wrong order. This is the correct one.

azinck’s picture

Status: Needs review » Needs work

@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.

kaare’s picture

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.

That'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. the fel_ 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 :-)

azinck’s picture

Status: Needs work » Needs review

Ah, 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.

  • kaare committed a479e6e on 7.x-1.x
    Issue #2764331 by kaare, azinck, tsewa: fel_fields throws missing module...
kaare’s picture

Status: Needs review » Fixed

Aight. Consensus reached :-)

Status: Fixed » Closed (fixed)

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

3magnus’s picture

Status: Closed (fixed) » Active

I'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?

kaare’s picture

I failed to reproduce this. Could you mix up a recipe where I'm able to trigger this?

Steps I did now was:

  • fel* enabled
  • Field collections disabled
  • Disable/uninstall views
  • Downgraded views to 3.11 and installed it
  • Upgrade views to 3.14
  • Ran update.php

Still couldn't reproduce any warnings/errors.

3magnus’s picture

Hi @kaare. Here's the recipe:

  1. Install a fresh Drupal 7.44 site;
  2. Add a new content type;
  3. Install Field UI, CTools, Form element layout 7.x-1.0-beta2 and Form element layout fields 7.x-1.0-beta2;
  4. Go to your content type and add a text field using Fel (I always select Before for text position);
  5. Now replace Drupal with version 7.50 and run the update script => at the Review log step you have the first warning;
  6. And then replace Fel with the latest dev (2016-Aug-12) and run the update script => at the Review updates step you have the second warning, before finishing database update;

I think that's all the info.

yce’s picture

Status: Active » Needs review
StatusFileSize
new2.95 KB

The 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.

  • kaare committed e3513be on 7.x-1.x
    Issue #2764331: fel_fields.module: Don't lookup drupal paths on likely...
kaare’s picture

Status: Needs review » Fixed

Thx @yce for catching this!

djpable’s picture

May we have a patch to apply https://www.drupal.org/project/fel/releases/7.x-1.0-beta2 ?
Or a new release ?

Thank you

  • kaare committed a0bb945 on 7.x-1.x
    Issue #2764331: Use correct operands for field_collection_table override...

Status: Fixed » Closed (fixed)

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

mqanneh’s picture

Issue summary: View changes