Error preparing data for the child element renderer.
The problem is that the child element does not come with an array a "null" and it assigns an array key with a value. For example: "$element[$key] ['#tree'] = $element ['#tree'];"
The child element is assigned "null" in the module: "uc_attribute", in the function: "_uc_attribute_alter_form()" and this "null" is rendered.
A simple option: instead of "null" pass an empty array, but the toga child element will be empty and it will be assigned to the blank parameters.
A more difficult option: to make checks for the emptiness of attributes, if not, then do not give an empty attribute parameter to the renderer.
Comments
Comment #2
yuraosn commentedAdded patch
!!! The path of the patch from the root of the site, if someone else has a way to change the patch to apply.
Comment #3
yuraosn commentedComment #5
yuraosn commentedComment #6
yuraosn commentedComment #7
tr commentedWhen does this error occur? How can I reproduce this error?
There was a very similar issue fixed in #2750151: Return empty array instead of null for attributes form back in February - are you sure you're using the current -dev?
_uc_attribute_alter_form()no longer returnsNULL, it returnsarray().(You can't mark your own issue as RTBC. See the Issue queue handbook)
Comment #8
yuraosn commentedThat's right, the problem is not for the virgin version, but for "7.x-3.10".
In a similar problem was solved in a simple way, as written in my description.
With this method, the processing of child elements is wasted, although I do not see any reason why.
So I realized the second way, it is in the patch.
Comment #9
yuraosn commentedComment #10
tr commentedIn Drupal, fixed-point releases like Ubercart 7.x-3.10 cannot be changed - if 7.x-3.10 has a bug, then it will always have that bug. Bugs get fixed in -dev, so bug fixes will become part of the next fixed-point release.
In this case, I believe the bug fixed and the fix is now part of Ubercart 7.x-3.11. If that's the case, then there is nothing to be done here.
Comment #11
yuraosn commentedComment #12
tr commented