Problem/Motivation
After upgrading from commerce_shipping 2.x to 3.x we get the following error on drush cr:
A non-existent config entity name returned by FieldStorageConfigInterface::getBundles(): entity type: commerce_order, bundle: default, field name: shipments
Comparing the installation, it looks like this with 2.x at admin/commerce/config/order-types/default/edit/fields:

and on 3.x the field is gone - which might cause the issue?
We ran drush updb without any errors.
Steps to reproduce
Upgrade from 2.x to 3.x.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 3588997-restore-shipments-field-configs.patch | 2.11 KB | mkalkbrenner |
| commerce_shipping-2.x-shipments.png | 33.8 KB | anybody |
Issue fork commerce_shipping-3588997
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
Comment #2
pnigro commentedI am also getting this error when updating Drupal core to 11.3.9.
Comment #3
pnigro commentedCould #3045509: EntityFieldManager key/value field map gets out of sync, doesn't recognise bundle fields be the cause?
Comment #4
anybodyThanks @pnigro indeed at the time core was also upgraded to
11.3.9which may be the resulting combination.Did you also use 2.x before and upgraded to 3.x or had a fresh installation with 3.x?
Comment #5
anybodySetting priority to major as it might happen for anyone upgrading to Drupal Core 11.3.9 and I'm totally unsure which side-effects this may have. If it's just the message, feel free to lower the priority again!
Comment #6
pnigro commentedYou're welcome @anybody. I only updated Drupal core to 11.3.9 and received this error. I upgraded Commerce from 2.x to 3.x awhile back. I tried to reproduce this on a vanilla install but could not.
Comment #7
hcksharp commentedAlso getting the error (FieldStorageConfigInterface::getBundles(): entity type: commerce_order, bundle: physical, field name: shipments) after updating to 11.3.9.
I am on Commerce 3.3.5. for quite some time now. I am seeing the error message on my dev stack. First seen it after running the update, but every time I clear cache either via the admin or truncate in the database I see the entry in my logs.
Done multiple checkouts and no errors in the logs or odd behaviors I notice.
Comment #8
anybodyNow we've additionally had this error in logs:
on editing a product.
Referrer: https://www.example.com/admin/commerce/products
Comment #9
hcksharp commentedI did some further investigation and the fix for me is restoring or importing the missing configuration resolves the issue immediately. Once the field instance exists, cache rebuild completes successfully with no more errors logged.
field.field.commerce_order.{bundle}.shipmentsfield.field.commerce_order.physical.shipmentsNot sure why the field instance was not there to begin with.
Comment #10
agoradesign commentedI don't think, #9 is the correct solution, because this is a bundle field, see #3071627: Create order shipment field through bundle field definition - not form submission
Comment #11
jsacksick commented#9 is definitely not the correct solution. The field is now defined through code, as explained in the referenced issue.
Afaik, this is just a warning (this needs to be fixed ofc, but I don't think this has other consequences)... Commerce shipping 3.x runs fine on a big production website I'm running that was previously on 2.x.
Comment #12
jsacksick commentedComment #13
anybodyThanks for the feedback @jsacksick! Are you also seeing these messages with Drupal 11.3.9?
Comment #16
tbkot commentedI've added changes that should resolve this issue.
FieldViewsDataProvidertries to generate data for every field configuration related to the field storage. What is interesting is that it takes into account fields created by theentity_bundle_field_infohook to get a list of bundles where this field is used, and ignores it entirely in the cycle and checks only for field configurations. I hope it will be resolved soon in #2898635: bundleFieldDefinitions() are not added in EntityViewsDataThere were two ways to fix this warning:
custom_storage: truein thefield.storage.commerce_order.shipmentsentity_field_storage_infohookI was trying to use the second variant in #3071627: Create order shipment field through bundle field definition - not form submission, and remove the field storage configuration with
uninstallFieldStorageDefinitionmethod or by removing it as an entity. In both cases, the field table was removed, so I decided to keep the configuration and addedpersist_with_no_fields: trueto make sure that the storage will not be removed with the last field configuration. What I didn't try is to remove the field storage config via the config factory service, which I did in the current issue, and it works well. I would suggest verifying everything before adding it as a patch to any production environment.Another thing that we have to do for both solutions is to define view data for the "shipments" field. As I mentioned before, Drupal does not generate it for fields defined in
entity_bundle_field_infohooks, and we don't want any broken views.Comment #17
jsacksick commentedI haven't tested the changes, but is there an alternate solution possible? I'm really afraid by the big MR and don't really want to take the risk (even the slightest) of loosing data... The data loss risk should be considered here.
I'd like to understand why this suddenly became a problem with 11.3.9. I'm seeing the errors in one of the projects I'm working on that's on 11.3.9, but no functionality seems to be affected... So would be great to understand what's going on and see if we could fix this differently...
Comment #18
jsacksick commentedAdding potential related issues. (Looking at the Drupal 11.3.9 changes, there haven't been many changes since 11.3.8).
Comment #19
mkalkbrennerWhat seems to happened here:
- Commerce Shipping 3.0.2 has a post-update (commerce_shipping_update_10303) that removed the per-bundle shipments field configs.
- Drupal 11.3.9’s Views field-map behavior now logs an error when field storage says a field exists on bundles but the matching field.field.* config entities do not.
Comment #20
mkalkbrennerAs an experiment I re-added the field configs. The site seems to work.
But I can't judge what is the right direction here.
Comment #21
jsacksick commentedAnd I think this is a bug, because this ignores declaring fields through the hook.
Comment #22
mkalkbrennerAs a workaround, I ran the update from #20 and just commited the modified / added configs to our config sync folder. That change should be easy to be reverted when we have a solution here.
@jsacksick are you expecting any side effects from that workaround?
Comment #23
jsacksick commentedre: #20 This workaround goes against the direction of the module as we were explicitly deleting those config objects in favor of the hook so... I can't really guarantee that this wouldn't cause issues later down the road.
Comment #24
brightboldWe also encountered this error updating from 10 to 11 only. The 2.x -> 3.x upgrade had taken place previously.
@jsacksick What's the recommended short-term solution? Is this safe to ignore until a better solution is found?
Also based on your comment it looks like this should be Needs Work and not Needs Review so I changed it.
Comment #25
mkalkbrennerWe used the workaround I posted in #20 to create the configs and included these configs in yesterday's update. So far, the site behaves well and we're not flooding the logs like we have seen it in the tests before.
For sure we hope for a proper solution here or in core and will remove the additional configs later.
Comment #26
poker10 commentedRe: #9
@jsacksick Technically it is not a warning, it is an error, see: https://git.drupalcode.org/project/drupal/-/blob/main/core/modules/views.... Is there any workaround? We are also experiencing this after the latest upgrades (Drupal core 11.3.13, Commerce 3.3.6) and it is spamming our logs and emails, as the core message is emiting an error. Thanks!
Comment #27
ramlev commentedI see the issue still on Drupal 11.3.12, Commerce 3.3.6 and Commerce Shipping 3.02.
Imho it should be a major priority and not normal. It's throwing entries to the watchdog, syslog, custom maillog - whatever log-system we're using.
Comment #28
jsacksick commentedComment #29
jsacksick commentedI'll need to circle back to this but haven't had time to properly dig... I agree this is annoying error in the logs that needs to be addressed.
Comment #30
berdirAlso running into this.
The reason it happens now is #3045509: EntityFieldManager key/value field map gets out of sync, doesn't recognise bundle fields, which has been backported as a bugfix to 11.3 in April.
For some reason this shipment field exists as a field_storage config entity, but then not as a field_config entity, which I think isn't really valid. Maybe an inconsistency on updated sites? Additionally, this module did not manage the field map as it was meant to, which resulted in the getBundles() call in \Drupal\views\FieldViewsDataProvider::defaultFieldImplementation() returning nothing, so it returned early. Now it proceeds because the field map is now just a cache, built on the field definitions.
It looks like #3564973: Optimize field views data building might have fixed this in 11.4+, as it removes the FieldConfig::load() and replaces it with EntityFieldManager::getFieldDefinitions(). Will try backporting that for our project to see what happens. That said, this could fail later on as views might expect a field_config when it manages to define the views data for it.
Comment #31
websiteworkspace commentedobserved today during - drush updb and drush cr - when updating a module unrelated to commerce:
Comment #32
niki v commentedRunning into this issue when using search API. Catalog searches that were previously accurate aren't always returning any or all values any more, and some searches also return these messages in dblog as views errors
"A non-existent config entity name returned by FieldStorageConfigInterface::getBundles(): entity type: commerce_order, bundle: default, field name: shipments"
Comment #33
websiteworkspace commentedThere appear to multiple interlated problems with the commerce shipping code:
The following problem cases a WSOD crash:
Comment #34
websiteworkspace commented2026.08.01
I have installed the update_config_entity module and have executed the drush command below, but that does not fix these related problems.
Comment #35
websiteworkspace commentedI have tried the following suggested fix, but it does not fix the problem:
Comment #36
jsacksick commentedThat one seems completely unrelated to this issue. This would seem to happen for a deleted order.
Comment #37
websiteworkspace commentedRegarding #33
This error is produced on a new site in which there have never been any "deleted" orders.
The error occurred immediately after installing the xray_audit module and then clicking on the xray_audit_insights settings menu item, which apparently initiates code that scans configuration in some way. The result is a white screen of death (WSOD) crash.
(context) The following anomaly report appears in the drupal error_log file.
Comment #38
mkalkbrennerAny news here?
https://www.drupal.org/project/commerce_shipping/issues/3588997#comment-... helps us to run our site, but it is not a good state.
Comment #39
jsacksick commented@mkalkbrenner: Are you still experiencing the error? Seems to be fixed in newer versions of Drupal (see the patches mentioned in https://www.drupal.org/project/commerce_shipping/issues/3588997#comment-...).