In https://www.drupal.org/project/facets/issues/3006741 a dependency was added on block_content_update_8600. But that module might not be installed. If that's that case facets_update_8006 cannot run.
Also the dependency requires drupal 8.6 and is never satisfied on 8.5.

Comments

mfernea created an issue. See original summary.

mfernea’s picture

Issue summary: View changes
mfernea’s picture

Assigned: mfernea » Unassigned
Status: Active » Needs review
StatusFileSize
new855 bytes

Here is the patch.

gngn’s picture

Title: Cannot execute facets_update_8006 due to missing dependencies block_content_update_8600 » Cannot execute facets_update_8006 due to missing dependencies block_content_update_8600 (also fails with core 8.5)
StatusFileSize
new903 bytes

There is a similiar problem with core 8.5:

Using drupal core 8.5 I cannot execute the facets_update_8006().

drush updatedb shows the update info "Update facet blocks configuration with a block id used for AJAX support" (taken from the description of facets_update_8006) but the function is never called.

I digged a little deeper and found:

  • the dependency check introduced in #3006741 checks for the update of core module block_content 8600 (facets_update_dependencies())
  • update block_content 8600 is part of drupal 8.6 but not of 8.5
    (update number 8600 -> core 8.6)
  • So facets_update_dependencies() blocks the execution of facets_update_8006() until block_content update 8600 is performed - which is never!
  • So facets_update_8006() is never executed!
  • and the next drush updatedb will show facets_update_8006 again and again!

See hook_update_N() and hook_update_dependencies().

I think we need to check drupal version too.
Patch attached.

P.S. I did not find this issue at first, so I created a new one (#3027801). Closing that one now.

gngn’s picture

Issue summary: View changes
StatusFileSize
new878 bytes

Patch #4 without file mode change.

Also updated description.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, maybe we should introduce a dependency on core 8.6 in the same patch as well?

gngn’s picture

@borisson_ : the module is running with 8.5 so I do not think we should add an 8.6 dependency.
It's just if you have 8.6 (and block_content is enabled), than you need to execute update block_content 8600 before update facets_update_8006.

borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed.

  • borisson_ committed 04f2860 on 8.x-1.x authored by gngn
    Issue #3019306 by gngn, mfernea, borisson_: Cannot execute...

Status: Fixed » Closed (fixed)

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