Magento 1.8: Can’t Change Customer Address in Admin – Fix

addressmagento-1.8

I have Magento 1.8.1 CE and cannot change the customer address anymore. I do not know what has changed, I have not done this for a while.

When I go to the customer screen in admin I get this error on the main page.

SyntaxError: unterminated string literal
this.itemContentTemplate = new Template('#{company}

Then I go to the addresses
Then I get this error:

ReferenceError: customerAddresses is not defined

I cannot change an existing address either.

Changing on the front-end is possible, and successful But the customer also gets a warning that it isn't saved?

There are no entries in the system.log

Best Answer

It looks like you have modified the Address Templates and you put an invalid character in there. Go to System > Configuration > Customer Configuration > Address Templates and restore JavaScript Template to its default value:

#{prefix} #{firstname} #{middlename} #{lastname} #{suffix}<br/>#{company}<br/># {street0}<br/>#{street1}<br/>#{street2}<br/>#{street3}<br/>#{city}, #{region}, #{postcode}<br/>#{country_id}<br/>T: #{telephone}<br/>F: #{fax}<br/>VAT: #{vat_id}

Then check if that fixes your issue.