Problem with the Address Template Magento 2.4
-
15-04-2021 - |
Question
I am having problems with the address template, when I add a new client it adds fine, but when registering the addresses it does not do it correctly, it leaves all the instructions for this untranslated, example: Default Billing Address {{depend prefix}} {{var prefix}} {{/ depend}} {{depend middlename}} {{var middlename}} {{/ depend}} {{depend suffix}} {{var suffix}} {{ / depend}} {{depend firstname}} ...
La solution
Ok I've solved this issue, maybe it could help someone else, I have to say that I had migrated from M-1.8.1 to M-2.4.0 so I dont know you, but when I did it I had problems with eav_attribute_set table and if you wanted to continous with the migration you had to change Default for Default_1, ..., Default_8 and after migrate all data, in this table you found new records into, well I ran this query in mySQL :
select * from eav_attribute_set as eas inner join eav_attribute_group as eag on eag.attribute_set_id=eas.attribute_set_id where eas.entity_type_id=2 and eas.attribute_set_name='Default';
I took the value of attribute_set_id and change the file vendor/module-customer/API/ AddressMetadataInterface.php there I changed const ATTRIBUTE_SET_ID_ADDRESS = 2 for ATTRIBUTE_SET_ID_ADDRESS = the value of attribute_set_id that I got in the previous step (in my case was 13)
and that's it
I know is not a good practice change files in magento core, so you should do it in your child theme.
Maybe you should read this https://github.com/magento/magento2/issues/5873