Jump to content

[SOLVED] TECHNICAL ERROR: unable to save adresses


Recommended Posts

TECHNICAL ERROR: unable to save adresses <br/><br/>Details:<br/>Error thrown: [object XMLHttpRequest]<br/>Text status: parsererror<br/><br/>Any ideas how to fix this? I get this error after adding the address and clicking continue.<br/>Can you tell me in which module the error ocuers?

Link to comment
Share on other sites

The error comes from:

./themes/prestashop/js/order-address.js

function updateAddresses()

The problem is that the JSON object returned by order.php has something wrong with it and is triggering an error condition. Could be a case of quoting / escaping maybe. What does the address look like? The URL that is returning something untoward looks like:

order.php?processAddress=true&step=2&ajax=true&id;_address_delivery=' + idAddress_delivery + '&id;_address_invoice=' + idAddress_invoice+ '&token;=' + static_token

So presumably, "idAddress_invoice" has something in it order.php does not like. You could try adding an alert(idAddress_invoice); above the ajax portion of updateAddresses to see what is being passed.

Cheers

Link to comment
Share on other sites

  • 8 months later...
  • 6 months later...
  • 7 months later...

codegrunt I cannot understand what I need to change to make it work.

 

Everything was working fine with 1.4.3.

When I upgraded to 1.4.4 I got the same error with the others:

 

TECHNICAL ERROR: unable to save adresses

 

Details:

Error thrown: [object XMLHttpRequest]

Text status: parsererror

 

 

Can someone help?

Thanks!

Link to comment
Share on other sites

I think I’ve found one cause of the problem: I went into the admin area (back office) to “Preferences > SEO & URLs”, down where the shop domain name and stuff like that are set, and I had to change “automatically redirect to canonical URL” (or whatever it says in English) to “No” in order to get rid of that error. I don’t quite know what this does and/or how I make my theme compatible with it (after all, the default theme seems to have problems with this, too) but at least this annoyin error is gone for now.

 

The error came up on the order step one page where I can choose/specify addresses when I checked/unchecked the checkbox for same/additional addresses to use. The JS debug console showed me that when the “canonical URL” feature is enabled it would send a GET request to the current page’s (i. e. the order page) URL but the response would be empty. I have yet to find out what to do to fix that but it doesn’t send such a request when the “canonical URL” thing is disabled.

I hope that helps people that have a similar issue.

  • Like 1
Link to comment
Share on other sites

I have a very similar error:<br/><br/>TECHNICAL ERROR: unable to save adresses <br/><br/>Details:<br/>Error thrown: [object XMLHttpRequest]<br/>Text status: error<br/><br/>How did you solve yours? I would appreciate an extra clue, if possible.

 

Did you get the extra clue?

Would you tell me the clue?

 

Tnx!

Link to comment
Share on other sites

Hi Carl I have 1.4.4. The problem occurs on the original theme and my slightly modified theme. Address error when shipping to alternative delivery/billing address. Update quantity error in cart and the opc register form (for new and existing accounts) brings up a technical error also.

 

Turning of canonical urls under prefs/seo solves all but the last error - the opc error for new and existing accounts. Guest check out works.

 

My current work around is to redirect the opc new and existing accounts to the default sign in/sign up page (my account.php).

 

I have not added it to the bug tracker because so many others are already making these same comments.

Link to comment
Share on other sites

Well, this seems to be a hot topic. Or actually a hot issue as multiple topics can be found about this or similar issues.

 

I also get the same popup window and error message as the topic starter, but in my case it's caused by adding a different address for billing/delivery during checkout (the normal 5-step checkout). This error only occured after I updated PS 1.4.3 to 1.4.4.

 

I found out that someone else has already submitted this issue on the bug tracker. A Prestashop developer has suggested a fix that seems to work for the bug submitter. I haven't tested it myself yet but will report back once done.

 

You can see the proposed fix here:

http://forge.prestashop.com/browse/PSCFI-3068

 

I'm curious if this works for all of you too.

 

Andreas

Link to comment
Share on other sites

I have now tested the proposed fix for this issue (see link to bug tracker in my post above) and can confirm no more error message. This is while still having friendly and canonical URL enabled. So I'm a happy camper again!

 

To be clear again: in my case this error appeared during checkout (5-step system) upon adding a different address for billing/delivery (or rather upon unchecking the option to use the same address for both). I'm not using the OPC system so I cannot confirm if the fix works in that case as well.

 

The fix is changing line 347 (for PS 1.4.4) in classes/FrontController.php:

 

if (!preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($this->ssl AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))

 

into:

 

if (!Tools::getValue('ajax') && !preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($this->ssl AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))

 

Hope this works for you as well!

  • Like 2
Link to comment
Share on other sites

The problem was may be in friendly-url mode, and for friendly-url mode you must mention each page url-rewrite field,

 

So go to Back Office >Preferences>SEO & URLs and make sure each page and also in each language have the url-rewrite , do not leave any one language blank.

 

Hope this will solve your problem,

 

thanks,

Arafat jahan

Link to comment
Share on other sites

The problem was may be in friendly-url mode, and for friendly-url mode you must mention each page url-rewrite field,

 

So go to Back Office >Preferences>SEO & URLs and make sure each page and also in each language have the url-rewrite , do not leave any one language blank.

 

Hope this will solve your problem,

 

thanks,

Arafat jahan

 

I have the url-rewrite for all languages in order.php (that is where error occurs), and I have same problem that AKJV:

 

... this error appeared during checkout (5-step system) upon adding a different address for billing/delivery (or rather upon unchecking the option to use the same address for both)...

Link to comment
Share on other sites

I couldn't find a solution, so I just ...ignored the error.

In the file \themes\yourtheme\js\order-address.js, in the last lines (around 119), I quoted the next line:

 

//error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}

 

The result is that I no longer get the error.

I just hope I haven't created another that I cannot see. :)

  • Like 2
Link to comment
Share on other sites

I think I’ve found one cause of the problem: I went into the admin area (back office) to “Preferences > SEO & URLs”, down where the shop domain name and stuff like that are set, and I had to change “automatically redirect to canonical URL” (or whatever it says in English) to “No” in order to get rid of that error. I don’t quite know what this does and/or how I make my theme compatible with it (after all, the default theme seems to have problems with this, too) but at least this annoyin error is gone for now.

 

The error came up on the order step one page where I can choose/specify addresses when I checked/unchecked the checkbox for same/additional addresses to use. The JS debug console showed me that when the “canonical URL” feature is enabled it would send a GET request to the current page’s (i. e. the order page) URL but the response would be empty. I have yet to find out what to do to fix that but it doesn’t send such a request when the “canonical URL” thing is disabled.

I hope that helps people that have a similar issue.

 

Hi there,

Thank you very much, I had the same problems and it was solved with switching off canonical URL !

Thx

Link to comment
Share on other sites

  • 1 month later...

I think I’ve found one cause of the problem: I went into the admin area (back office) to “Preferences > SEO & URLs”, down where the shop domain name and stuff like that are set, and I had to change “automatically redirect to canonical URL” (or whatever it says in English) to “No” in order to get rid of that error. I don’t quite know what this does and/or how I make my theme compatible with it (after all, the default theme seems to have problems with this, too) but at least this annoyin error is gone for now.

 

The error came up on the order step one page where I can choose/specify addresses when I checked/unchecked the checkbox for same/additional addresses to use. The JS debug console showed me that when the “canonical URL” feature is enabled it would send a GET request to the current page’s (i. e. the order page) URL but the response would be empty. I have yet to find out what to do to fix that but it doesn’t send such a request when the “canonical URL” thing is disabled.

I hope that helps people that have a similar issue.

 

 

Mate, you are a superstar - that fixed it for me! FANK U!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Turning off Canonical URLs worked for me too. However, what am I losing by turning them off. I thought Canonical URLs was a good thing?

 

Prestashop v 1.4.4.0

 

I might have to try the frontcontroller modification to see if that works too.

Link to comment
Share on other sites

  • 11 months later...

Tengo este mismo error en Prestashop 1.5, alguna idea de como solucionarlo?

Me sale al seleccionar una dirección y después continuar.

 

TECHNICAL ERROR: unable to save adresses

Details:

Error thrown: [object XMLHttpRequest]

Text status: parsererror

Link to comment
Share on other sites

  • 5 months later...

This problem still occurs in my 1.5.4.1. I thought i had it resolve as suggested by others where you regenerate htaccess file but did not work. I also happens to me during checkout process where you update an address and also when you select an address from the drop down list.

Any fix

Link to comment
Share on other sites

  • 4 weeks later...

Hi, AKJV, I am looking this file in 1.4.9 and it is exactly aas yours, but it stills does not work for me.

 

I still get this "unable to save address" in 1.4.9

 

I do not want to deactivate Canonical URL, as I think is really important.

 

I am going to search in the forum, and I will post the answer if I find it.

 

Thank you

 

I have now tested the proposed fix for this issue (see link to bug tracker in my post above) and can confirm no more error message. This is while still having friendly and canonical URL enabled. So I'm a happy camper again!

 

To be clear again: in my case this error appeared during checkout (5-step system) upon adding a different address for billing/delivery (or rather upon unchecking the option to use the same address for both). I'm not using the OPC system so I cannot confirm if the fix works in that case as well.

 

The fix is changing line 347 (for PS 1.4.4) in classes/FrontController.php:

 

if (!preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($this->ssl AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))

 

into:

 

if (!Tools::getValue('ajax') && !preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($this->ssl AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))

 

Hope this works for you as well!

Link to comment
Share on other sites

I deleted SSL domain as I don't use it.

 

But now if I update quantities, it does not update total amount.

 

I am going to see if this is prestashop problem of my customization problem

 

RODOLFO

 

PS 1.4.9

Link to comment
Share on other sites

  • 4 months later...

I have now tested the proposed fix for this issue (see link to bug tracker in my post above) and can confirm no more error message. This is while still having friendly and canonical URL enabled. So I'm a happy camper again!

 

To be clear again: in my case this error appeared during checkout (5-step system) upon adding a different address for billing/delivery (or rather upon unchecking the option to use the same address for both). I'm not using the OPC system so I cannot confirm if the fix works in that case as well.

 

The fix is changing line 347 (for PS 1.4.4) in classes/FrontController.php:

 

if (!preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($this->ssl AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))
into:

 

if (!Tools::getValue('ajax') && !preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($this->ssl AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))
Hope this works for you as well!

 

Años despues.... Esta solución funciona para PS1.4.4.1, manteniendo activadas las url amigables y canonica. OK Thanks!.

Link to comment
Share on other sites

  • 5 months later...

Well I had the same error on PS152 with multistore. But the error appeared only in 1 shop out of 2. Turned the friendly URL off for a minute and then back on and the problem was gone. Not sure whether this is a temporary solution or not but the error won't come back, no matter how bad I want it back now :)

Link to comment
Share on other sites

  • 1 month later...

I am getting this error on Prestashop 1.5.6.2.

 

This is happening on checkout. I have made a user with 2 different address's. One is a Canada address, one USA. I have set shipping costs different for both. When I choose a different address from the drop down list (doesn't matter if "use delivery address as the billing address" is checked). The error comes up.

 

TECHNICAL ERROR: unable to save adresses

Details:
Error thrown: [object Object]
Text status: parsererror

 

At this point nothing on the page changes if I click "ok". If I refresh the page, the shipping price will change to reflect the new address chosen. The error only comes up again if I change the address from the drop down box.

 

One of the fixes above (The fix is changing line 347 (for PS 1.4.4) in classes/FrontController.php:) does not apply to me because my line in FrontController.php is completely different; probably because my version of Prestashop is newer.

 

Friendly and Accented URL's are disabled as well as "Automatically redirect to the canonical URL".

 

One solution above was to quote out the part In the file \themes\yourtheme\js\order-address.js, in the last lines (around 119), I quoted the next line:

//error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}

 

This solution did not work for me for some reason. I quoted out that line along with some other lines that I thought were related (Dreamweaver said so by showing a "red" mark) and I still got the error! If someone could show me every line to quote out I would appreciate it. Also, I wonder if I quote out the correct lines and do not get the error, will the shipping price update.

 

I did have a friend who knows PHP take a quick look at this issue and he couldn't fix it but made the below comments:

 

"the server side response sends gzipped data but does not tell the client side that the data is gzipped, so it tries to act on it as though it is plain text. Not sure if that is due to an apache setting, or where that disconnect is. Those particular requests are not setting the content-encoding properly, or it may be down to values in the .htaccess file... I tried some changes there, and some in the php but was unable to get any better results."

 

If anybody out there has any suggestions, I would greatly appreciate it!

 

Thanks!

Link to comment
Share on other sites

  • 7 months later...
×
×
  • Create New...