-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.x]: Invalid owner id on isElementDraftOrRevision() call #16359
Comments
Just updated You can test by changing your "craftcms/cms": "5.x-dev as 5.5.7", Then run Let me know if that helps. |
Thank you for your quick response!
A lot of this errors get printed on some Matrix entries, and then the process dies with
I am not sure though if this can be tracked back to the same leading cause, I have some more debugging to do. Do you have any recommendation? Thanks |
That The cms/src/base/NestedElementTrait.php Line 271 in c4a3405
The only way you’d get that error is if |
What happened?
Hi, we are building a multi-site website with Craft, we're in development since beta, and we're now trying to propagate entries to a new site instance, since we're using sites as per country variations.
I wrote a custom module, which i successfully used in Craft 4.x to propagate entries from a given site to a target one, it works ok for a lot of entries, but some Matrix fields throw "Invalid owner ID" when invoking
ElementHelper::isDraftOrRevision()
.The behavior is unrelated to the element save phase.
I also got for one particular entry the
Call to a member function getFieldById() on null
error, and it seems related to the missing owner id error, since it comes fromNestedElementTrait.php:243
class ingetField()
, which errors on$this->getOwner()?->getFieldLayout()->getFieldById($this->fieldId)
Do you have any idea on what could be going on and on how to correct this behavior?
The customer has already done a big part of the data entry and database corruption is really suboptimal at this stage.
Thanks in advance!
Craft CMS version
5.x, currently latest 5.5.7
PHP version
8.3
Operating system and version
Staging: Debian 12 - dev: macOS 15.2
Database type and version
Staging: MariaDB 10.6 - dev MariaDB: 11.6
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: