I have recently upgraded to Magento ver. 2.3.4 and currently have an issue in Checkout for registered customers.
When they get to the shipping part of checkout they cannot see the buttons for selecting a different shipping address or editing an address:
Looking at the developer console we can also see an Uncaught error which seems to relate to address:
Uncaught TypeError: Unable to process binding "foreach: function(){return {data:address().customAttributes,as:'element'} }" Message: Unable to process binding "text: function(){return $parent.getCustomAttributeLabel(element) }" Message: Cannot read property 'undefined' of undefined at UiClass.getCustomAttributeLabel (VM7680 default.js:68) at text (eval at createBindingsStringEvaluator (VM5344 knockout.js:1), :3:72) at update (VM5344 knockout.js:4659) at ko.dependentObservable.disposeWhenNodeIsRemoved (VM5344 knockout.js:3373) at Function.evaluateImmediate_CallReadThenEndDependencyDetection (VM5344 knockout.js:2173) at Function.evaluateImmediate_CallReadWithDependencyDetection (VM5344 knockout.js:2140) at Function.evaluateImmediate (VM5344 knockout.js:2101) at Object.ko.computed.ko.dependentObservable (VM5344 knockout.js:1954) at VM5344 knockout.js:3371 at Object.arrayForEach (VM5344 knockout.js:159)
I don't know if it's related but I also found this message in the Apache logs:
2020-02-26 13:30:00 Error 52.50.181.234 AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected ''Magen' (T_ENCAPSED_AND_WHITESPACE) in /var/www/vhosts/mywebsite.com/httpdocs/generated/metadata/global.php on line 19837\n', referer: https://www.mywebsite.com/checkout/
Could anyone please let me know why this is happening and what I need to to do resolve the issue please?
Thanks.
In addition to the above. The billing address page is also showing a similar error as below:
In addition we also get a similar error on the billing page
Uncaught TypeError: Unable to process binding "if: function(){return isAddressDetailsVisible() && currentBillingAddress() }" Message: Unable to process binding "foreach: function(){return {data:currentBillingAddress().customAttributes,as:'element'} }" Message: Unable to process binding "text: function(){return $parent.getCustomAttributeLabel(element) }" Message: Cannot read property 'undefined' of undefined at UiClass.getCustomAttributeLabel (billing-address.js:258) at text (eval at createBindingsStringEvaluator (knockout.js:2982), :3:72) at update (knockout.js:4659) at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3373) at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:2173) at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:2140) at Function.evaluateImmediate (knockout.js:2101) at Object.ko.computed.ko.dependentObservable (knockout.js:1954) at knockout.js:3371 at Object.arrayForEach (knockout.js:159)
OK. So
I've created a workaround solution which involves creating a new template in the following location:
httpdocs > app > design > frontend > ThemeVendor > ThemeName > Magento_Checkout > web > template > shipping-information > address-renderer > default.html
and commenting out the custom attributes section of the template
<if args="visible()"> <text args="address().prefix"/> <text args="address().firstname"/> <text args="address().middlename"/> <text args="address().lastname"/> <text args="address().suffix"/><br/> <text args="_.values(address().street).join(', ')"/><br/> <text args="address().city "/>, <span text="address().region"></span> <text args="address().postcode"/><br/> <text args="getCountryName(address().countryId)"/><br/> <a if="address().telephone" attr="'href': 'tel:' + address().telephone" text="address().telephone"></a><br/> <!-- <each args="data: address().customAttributes, as: 'element'"> <text args="$parent.getCustomAttributeLabel(element)"/> <br/> </each> --> </if>
Obviously this isn't ideal but at least it makes the website workable while I look for a better solution.
This now seems to be resolved.
Going into the database table eav_attribute and removing the following two values seems to have fixed the error:
ID - 175 - validation_status ID - 257 - email
I'm not sure what validation status is and email seems to be a duplicate value. Regardless removing these two rows from the database table seems to have resolved the error.
Hi
We are experiencing the same error in the checkout, since upgrading to 2.3.4. Although we do not have the same Attribute IDs in our eav_attribute table.
Can you tell me how you identified those attributes as being the problem?
Cheers
Rob