Problem/Motivation

Updating a multilingual page from layout_paragraphs 1.0.0 to latest 2.0.x-dev (1013cfc) as of 2022-01-26 runs forever:

drush updb
 ------------------- ----------- --------------- ------------------------------
  Module              Update ID   Type            Description
 ------------------- ----------- --------------- ------------------------------
  layout_paragraphs   9001        hook_update_n   9001 - The "Disabled Items"
                                                  feature has been deprecated
                                                  in Layout Paragraphs 2.x.
                                                  This update unpublishes all
                                                  paragraphs that were
                                                  previously saved under the
                                                  "Disabled Items" region.
                                                  @see
                                                  https://www.drupal.org/docs/
                                                  contributed-modules/layout-p
                                                  aragraphs/upgrading-from-1x-
                                                  to-2x @see
                                                  https://www.drupal.org/proje
                                                  ct/layout_paragraphs/issues/
                                                  3228597
 ------------------- ----------- --------------- ------------------------------
 [notice] Update started: layout_paragraphs_update_9001

Watchdog says:

Route "layout_paragraphs.modal_settings" does not exist.

Any ideas how that can happen? Which further information do you need?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#6 3260656-6-update2.x.diff517 bytesminoroffense
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

Anybody created an issue. See original summary.

anybody’s picture

Perhaps this was due to missing default settings when upgrading instead of fresh installation?
Similar to #3264678: Setting "Paragraph Behaviors Fieldset Position" is empty on update from 1.x?

If anyone is able to reproduce, please report.

anybody’s picture

Status: Active » Postponed (maintainer needs more info)
anybody’s picture

Just ran into the same issue again on a different project.

Clearing cache before running the update solves the issue. So maybe (see the watchdog issue in the summary) we need to clear specific caches in the beginning of the update?

anybody’s picture

Status: Postponed (maintainer needs more info) » Active

Setting this to active again, as clearing caches before running the update seems to solve it.

minoroffense’s picture

Status: Active » Needs review
StatusFileSize
new517 bytes

The query in the update hook doesn't check if the $ids list actually brings results (even if the initial max count showed more). Best guess is that the queries don't take count of language when it initially does the $max value (in my local env the count would stop about 50% of the way through and I have a billingual app).

So you end up with a check that will never reach the max processed ids. I added a check on that finished flag to see if the ids query returned anything or not. If it's empty presumably there's nothing left to do.

anybody’s picture

Thanks @minorOffense, perhaps justin2pin can have a look if that can cause the issue. So you can confirm the same happened to you?

(Before I was the only one reporting this issue).

heikofischer’s picture

I can confirm update 1.0.0 => 2.0.1 runs forever on drush updb - patch from #6 fixes this behaviour.

cobadger’s picture

Status: Needs review » Reviewed & tested by the community

Marking this as RBTC - patch #6 solved this issue for me.

justin2pin made their first commit to this issue’s fork.

  • justin2pin committed f11744f3 on 2.0.x
    Issue #3260656 by minorOffense: Update from 1.0.0 to 2.x (1013cfc) runs...
justin2pin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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