Problem/Motivation

When visiting the status report page, I'm seeing a dozen warnings, all starting with this:

Warning: foreach() argument must be of type array|object, null given in Drupal\commerce\CommerceContentEntityStorageSchema->getSharedTableFieldSchema() (line 21 of modules/contrib/commerce/src/CommerceContentEntityStorageSchema.php).

Drupal\commerce\CommerceContentEntityStorageSchema->getSharedTableFieldSchema() (Line: 979)
Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->getEntitySchema() (Line: 212)
Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->requiresEntityStorageSchemaChanges() (Line: 1456)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->requiresEntityStorageSchemaChanges() (Line: 324)
Drupal\Core\Entity\EntityDefinitionUpdateManager->requiresEntityStorageSchemaChanges() (Line: 261)
Drupal\Core\Entity\EntityDefinitionUpdateManager->getChangeList() (Line: 88)
Drupal\Core\Entity\EntityDefinitionUpdateManager->getChangeSummary() (Line: 955)
system_requirements()
call_user_func_array() (Line: 404)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 357)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 128)
Drupal\system\SystemManager->listRequirements() (Line: 53)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 53)
Asm89\Stack\Cors->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715)
Drupal\Core\DrupalKernel->handle() (Line: 19)

This spams the status report page.

Steps to reproduce

Install/configure this module, along with Drupal Commerce 3. Visit the status report page.

Proposed resolution

The "Hsn" field could be indexed -- add an index to this field, and then Commerce's updates will complete without warning.

Remaining tasks

User interface changes

API changes

Data model changes

New index installed on Hsn field.

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

freelock created an issue. See original summary.

freelock’s picture

Status: Active » Needs review

Fix in MR.

tomtech’s picture

Version: 1.1.2 » 1.x-dev
Assigned: Unassigned » tomtech

Hi @freelock,

Thanks for the report and MR.

This actually can be fixed with an empty array definition for the indexes, but I guess we can consider adding an index for Hsn field.

Going to re-target this at the 1.x branch, as all MRs should start there. (And move back to earlier branches, if necessary.)

  • tomtech committed f19cf19a on 1.x authored by freelock
    feat: #3556802 Warning on Status update page due to CardPointe "Terminal...
tomtech’s picture

Status: Needs review » Fixed

merged, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

freelock’s picture

Great, thanks!

Status: Fixed » Closed (fixed)

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