- Issue created by @maxilein
- ๐ฎ๐ณIndia vinodhini.e chennai
vinodhini.e โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia vinodhini.e chennai
Hi @maxilein,
Steps to Reproduce (Unable to Replicate the Issue):
1. Upgraded Drupal core from 11.2.2 to 11.2.3.
2. Ran database updates using: drush updb
3. The update ran successfully without any errors. Unable to reproduce the reported issue.Could you please provide more details or specific steps so I can attempt to reproduce the issue on my setup?
Hi @maxilein,
Here is a quick patch to fix those errors while running updates.
- ๐ฆ๐นAustria maxilein
Thank you Julien. That patch made the errors go away when upgrading.
More information on the Drupal CMS upgrade for vinodhini.e:
composer update Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 11 updates, 0 removals - Upgrading drupal/core (11.2.2 => 11.2.3) - Upgrading drupal/core-composer-scaffold (11.2.2 => 11.2.3) - Upgrading drupal/core-project-message (11.2.2 => 11.2.3) - Upgrading drupal/core-recommended (11.2.2 => 11.2.3) - Upgrading drupal/geofield (1.64.0 => 1.65.0) - Upgrading drupal/linkit (7.0.7 => 7.0.8) - Upgrading drupal/project_browser (2.1.0-beta2 => 2.1.0-beta3) - Upgrading drupal/solo (dev-1.0.x babe75b => dev-1.0.x 4b6e29e) - Upgrading drush/drush (13.6.1 => 13.6.2) - Upgrading nette/utils (v4.0.7 => v4.0.8) - Upgrading sebastian/diff (6.0.2 => 7.0.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 11 updates, 0 removals - Downloading sebastian/diff (7.0.0) - Downloading drupal/core (11.2.3) - Downloading drupal/linkit (7.0.8) - Downloading nette/utils (v4.0.8) - Downloading drupal/geofield (1.65.0) - Downloading drupal/project_browser (2.1.0-beta3) - Downloading drush/drush (13.6.2) - Syncing drupal/solo (dev-1.0.x 4b6e29e) into cache - Upgrading drupal/core-composer-scaffold (11.2.2 => 11.2.3): Extracting archive - Upgrading drupal/core-project-message (11.2.2 => 11.2.3): Extracting archive - Upgrading sebastian/diff (6.0.2 => 7.0.0): Extracting archive - Upgrading drupal/core (11.2.2 => 11.2.3): Extracting archive - Upgrading drupal/core-recommended (11.2.2 => 11.2.3) - Upgrading drupal/linkit (7.0.7 => 7.0.8): Extracting archive - Upgrading nette/utils (v4.0.7 => v4.0.8): Extracting archive - Upgrading drupal/geofield (1.64.0 => 1.65.0): Extracting archive - Upgrading drupal/project_browser (2.1.0-beta2 => 2.1.0-beta3): Extracting archive - Upgrading drush/drush (13.6.1 => 13.6.2): Extracting archive - Upgrading drupal/solo (dev-1.0.x babe75b => dev-1.0.x 4b6e29e): Checking out 4b6e29ea92 from cache Generating optimized autoload files 54 packages you are using are looking for funding. Use the `composer fund` command to find out more! No security vulnerability advisories found.
And the final working result with the patch included:
drush updb [warning] Drupal requires databases that support JSON storage. (Currently using Database support for JSON Available ) [warning] Package Manager is available for early testing. To install the module set the value of 'testing_package_manager' to TRUE in your settings.php file. โ Requirements check reports errors. Do you wish to continue? โโ โ Yes โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ----------------- --------------- ------------- ---------------------------- Module Update ID Type Description ----------------- --------------- ------------- ---------------------------- project_browser convert_enabl post-update Updates Project Browser ed_sources_to settings to support _arrays source-specific configuration. project_browser rebuild_conta post-update Clears the cache so that iner_for_oo_h Project Browser's OO hooks ooks are registered. ----------------- --------------- ------------- ---------------------------- โ Do you wish to run the specified pending updates? โโโโโโโโโโโโ โ Yes โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ > [notice] Update started: project_browser_post_update_convert_enabled_sources_to_arrays > [notice] Update completed: project_browser_post_update_convert_enabled_sources_to_arrays > [notice] Update started: project_browser_post_update_rebuild_container_for_oo_hooks > [notice] Update completed: project_browser_post_update_rebuild_container_for_oo_hooks [success] Finished performing updates.
- First commit to issue fork.
- Merge request !169Resolve #3540400 "TypeError: unsupported operand" โ (Open) created by chrisfromredfin
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
To reproduce this you must be using latest Project browser.
Project Browser changed how it's keying things, it seems, so the $key we iterate is no longer numeric.
foreach ($project_browser_enabled_sources as $key => $source_id) { $links['project_browser.browse.' . $source_id] = [ 'route_name' => 'project_browser.browse', 'parent' => 'system.modules_list', // Menu items are ordered by the enabled sources. 'weight' => -10 + $key, ....
I've confirmed that the order the user places them in matches the order they end up in the config object in, so I would say it might make sense to just iterate based on the array positions. However, the current iteration of the patch just does
(int) $key
which is always a string and would make them all have the same weight.I have opened an MR based on the patch, but with some different intelligence for handling the weighting (which was the real issue in the first place).
- ๐ณ๐ฑNetherlands jurriaanroelofs
Sorry Im late to the party I see chrisfromredfin had already figured this out, I made this patch yesterday and just remembered I had not posted it yet.
- ๐ฉ๐ฐDenmark ressa Copenhagen
Thanks for reporting and clarifying the error source and task, I am updating the Issue Summary.
It does look like the GitLab MR is pretty big, so maybe the Status should be "Needs work"?
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
Yeah, I think the huge diffstat is a result of formatting it for coding standards, because I thought we needed to (Pipeline is failing for phpcs).
I think we should apply the patch from 10 into !169 and push that and re-mark Needs Review. Setting back to Needs Work; hopefully ressa can do that work and then re-mark NR?