Closed robertgarrigos closed 1 year ago
Thanks, @robertgarrigos. This is a legitimate error. It happens when a function tries to assign the wrong type of value to an entity field via a metadata wrapper, for example, assigning an array to a field that only accepts a string (via metadata wrapper's set
). Rather than focusing on debugging Entity Plus, please try to track down the error to see which module is producing it. In my experience, 100% of the time this is due to an error beyond E+.
Thanks, @argiepiano. For now, I cant tell you that this happens only with php 8.x. No problem with php 7.4
Thanks. That's an important clue. Would you be willing to do some debugging to find out which metadata property is throwing this in your site?
The easiest way to debug this is to insert the following in entity_plus.wrapper.inc
, line 760
if (!$this->validate($value)) {
dpm($value, 'value'); dpm($this->getPropertyInfo(), 'propertyInfo');
throw new EntityMetadataWrapperException('Invalid data value given. Be sure it matches the required data type and format.');
}
Notice the added dpms. Then paste the output here.
Sorry, @argiepiano, I cannot reproduce the error. I had other errors, which provably affected this one, as I fixed them and made this one disappear.
With lates version 1.x-1.0.18, I'm having this error when saving a custom node type:
I will try to track it down, but just leaving this issue here for now.