Problem/Motivation

Follow-up for #3376376-26: HelpSectionManager::clearCachedDefinitions breaks the update system

We should be able to remove both places in 11.x - once the update is removed, we can also guarantee that the module has been updated to at least this schema version. Let's open a follow-up for that explicitly since there's no @deprecated tag or anything and probably a @todo linking to the issue as well.

$ git grep 10200 -- core/modules/help
core/modules/help/help.install:56:function help_update_10200(&$sandbox = NULL) {
core/modules/help/help.module:151:  if (\Drupal::service('update.update_hook_registry')->getInstalledVersion('help') >= 10200) {
core/modules/help/src/HelpSectionManager.php:61:    if ($this->searchManager && $version >= 10200) {
core/modules/help/tests/src/Functional/Update/HelpTopicsMerge.php:33:   * @see \help_update_10200()
core/modules/help/tests/src/Functional/Update/HelpTopicsUninstall.php:32:   * @see \help_update_10200()

Proposed resolution

Remove check and update hook help_update_10200() when updates for 11.0 will be prepared

Remaining tasks

patch, review, commit

User interface changes

no

API changes

no

Data model changes

no

Release notes snippet

Issue fork drupal-3376516

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

catch’s picture

Issue tags: +Major version only
andypost’s picture

I think we can remove help topics module's remains within the same issue

andypost’s picture

Also when update hooks will get cut on next major, or it will need own own issue

quietone’s picture

Stumbled upon this. Issues for removing deprecated code should be a child of the relevant Meta issue to remove deprecated code from the upcoming major.

andypost’s picture

Status: Active » Needs work

Added review, only this 2 places to fix but MR removing code instead of just version check

quietone’s picture

@andypost, thanks. I did this quickly without much thought or knowledge of the help and search system. I need to concentrate on other things for a while so hopefully someone else can finish this.

andypost’s picture

Status: Needs work » Needs review

quickly reverted and fixed, looks it can be backported to 10.3.x

andypost’s picture

No, it should not be backported to 10.x because the hook is required to be executed before cache cleaning

The fix probably needs better comment about order of cache cleaning for plugins, somehow search is cleaned after help, probably because of alphabetic order

andypost’s picture

Historically the hook creating new database table for search indexing but table-exists-check is too expensive to use at runtime

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

This was posted in #needs-review-queue-initative so taking a look.

Maybe in the future we should drop a comment like //remove in drupal:11.0.0 so it gets picked up in greps.

But nice catch! Replacement seems fine

  • catch committed 1573479d on 11.0.x
    Issue #3376516 by andypost, quietone: Remove check for 10200 update from...

  • catch committed 5a3ca127 on 11.x
    Issue #3376516 by andypost, quietone: Remove check for 10200 update from...
catch’s picture

Version: 11.x-dev » 11.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 11.0.x, thanks!

Status: Fixed » Closed (fixed)

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