There is an update dependencies conflict.

We need to run commerce_product_update_8208 after commerce_order_update_8207

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

facine created an issue. See original summary.

facine’s picture

Status: Active » Needs review
FileSize
967 bytes
bojanz’s picture

Status: Needs review » Needs work

Did this patch make the update process succeed on your end?
I am assuming that the error happens because installing the submodule clears the caches before the field definitions are updated, but this patch only makes the product updates happen before, the order's order_items field is still converted after the submodule is installed. So my theory might be wrong.

Here's a review:
1) We need to account for installs that use commerce_order without commerce_product, remove no dependencies if commerce_product is not installed.

2) Let's depend on commerce_product_update_8209 instead of commerce_product_update_8208 since that completes the base field conversion process (by fixing the Views).

3) The code comment is wrong, it is ensuring that commerce_order_update_8207 is executed after, not before the product update.

bojanz’s picture

Status: Needs work » Needs review
FileSize
1020 bytes

Here's an updated patch.

Do you still have a backup you could test this one? Just in case the change to commerce_product_update_8209 broke anything.

facine’s picture

Status: Needs review » Reviewed & tested by the community

#4 works fine, thanks!

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Apparently I'm still asleep today.

Committed in https://www.drupal.org/commitlog/commit/11974/ff92243a51f29ce0f7f66e9116... with the wrong commit message.

Status: Fixed » Closed (fixed)

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

idefix6’s picture

I upgraded now to the current dev version with:
composer require 'drupal/commerce:2.x-dev'

I see:

  - Removing drupal/commerce (2.16.0)
  - Installing drupal/commerce (dev-2.x ba7ede3): Cloning ba7ede30db from cache

But if I try to execute:
./vendor/bin/drush cache-rebuild --uri drupal8.xxxx.de

I get the error:

In DefaultTableMapping.php line 391:

  Table information not available for the 'stores' field.


cache:rebuild [--cache-clear [CACHE-CLEAR]] [--no-cache-clear] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--notify [NOTIFY]] [--xh-link XH-LINK] [--druplicon] [--] <command>

the site is completely broken and does not work anymore.

Do you have an idea how to fix this, that the site can continue to work?

facine’s picture

I think you need to execute: ./vendor/bin/drush updatedb --uri drupal8.xxxx.de

idefix6’s picture

Yes, but I only get:

 [warning] The following module is missing from the file system: icon bootstrap.inc:295
 [warning] The following module is missing from the file system: icon_block bootstrap.inc:295
 [warning] The following module is missing from the file system: icon_field bootstrap.inc:295
 [warning] The following module is missing from the file system: icon_filter bootstrap.inc:295
 [warning] The following module is missing from the file system: piwik bootstrap.inc:295
 [success] No pending updates.

So it seems that I have to enforce this update in a way I do not know.
Can you maybe help here, please?

facine’s picture

idefix6’s picture

I get in the logfile:

2020/02/06 08:32:17 [error] 10389#100968: *1075943 FastCGI sent in stderr: "PHP message: Drupal\Core\Entity\Sql\SqlContentEntityStorageException: Table information not available for the 'stores' field. in /usr/local/www/drupal8/web/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php on line 391 #0 /usr/local/www/drupal8/web/modules/contrib/commerce/src/CommerceEntityViewsData.php(499): Drupal\Core\Entity\Sql\DefaultTableMapping->getFieldTableName('stores')
#1 /usr/local/www/drupal8/web/modules/contrib/commerce/src/CommerceEntityViewsData.php(71): Drupal\commerce\CommerceEntityViewsData->addReverseRelationships(Array, Array)
#2 /usr/local/www/drupal8/web/core/modules/views/views.views.inc(178): Drupal\commerce\CommerceEntityViewsData->getViewsData()
#3 [internal function]: views_views_data()
#4 /usr/local/www/drupal8/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(392): call_user_func_array('views_views_dat...', Array)
#5 /usr/local/www/drupal8/web/core/modules/views/src/ViewsData.php(245): Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data')
#6 /usr/local/w" while reading response header from upstream, client: 2a02:<removed>:b997, server: drupal8.<removed>.de, request: "GET /update.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "drupal8.<removed>.de"
idefix6’s picture

With version 2.17 and the new drupal 8.8.3 it works now.
Maybe drupal 8.8.3 has a bug in core that blocked this (at least for me).

Thanks a lot!

Honza Pobořil’s picture

Update did not worked by drupal update:execute but by update.php worked (after backup restore).