babyewok Posted August 30, 2011 Share Posted August 30, 2011 I have the latest version of prestashop but on the modify address page in the front office I get and invalid token error - what is causing this? Link to comment Share on other sites More sharing options...
Mike Kranzler Posted August 31, 2011 Share Posted August 31, 2011 Hi babyewok, Can you please post your URL so that we can look into it and see if its a global issue or just restricted to Endor? -Mike Link to comment Share on other sites More sharing options...
rafito Posted September 8, 2011 Share Posted September 8, 2011 I have the same problem my site http://www.hermitagers.com.br/lojavirtual/ please help us to solve this problem Rafael Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 8, 2011 Share Posted September 8, 2011 Hi rafito, What version of PrestaShop are you using? -Mike Link to comment Share on other sites More sharing options...
leelee23 Posted September 8, 2011 Share Posted September 8, 2011 I've also got the same problem. My version is the latest - 1.4.4.1 Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 8, 2011 Share Posted September 8, 2011 Hi leelee, Can you post a screenshot of the issue you're encountering? -Mike Link to comment Share on other sites More sharing options...
leelee23 Posted September 13, 2011 Share Posted September 13, 2011 Oops sorry Mike, I didn't subscribe to this thread so only just noticed your reply. No problem - please see attached. I think I have a rough idea what the problem could be. On the page load.. the Identification Number appears at first... and then when the Ajax kicks in, this gets hidden and the State/County box appears (as in the screenshot). The Identification Number does have a * against it also - even though for the United Kingom (as seen in the screenshot) has the settings for "Need Idenfitictation Number" as "No". Any help on this would be greatly appreciated. Cheers, Lee Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 14, 2011 Share Posted September 14, 2011 Hi Lee, In this situation, the best thing to do will be to report it through our Bug Tracker. Once you do that, please come back and post the link to your report so that I can personally monitor it and make sure our developers look into it for you. Let me know if you have any additional questions. -Mike Link to comment Share on other sites More sharing options...
leelee23 Posted September 14, 2011 Share Posted September 14, 2011 Thanks Mike, much appreciated. Here's the link: http://forge.prestashop.com/browse/PSCFI-3404 Cheers, Lee Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 14, 2011 Share Posted September 14, 2011 Thanks for the link Lee, I've created a report to send directly to our development team and will let you know as soon as I hear back from them. -Mike Link to comment Share on other sites More sharing options...
nahlin Posted September 14, 2011 Share Posted September 14, 2011 Hi, have you modify the registration or address forms before? I've had this error recently. I modified the forms on a earlier prestashop version to delete some fields and this error appeared after upgrading to 1.4.4.1. I fixed it replaicing my current authentification.tpl, address.tpl and addreses.tpl for my original theme files, of course I had to modify these again, but at least I fixed it :3 Good luck. Link to comment Share on other sites More sharing options...
leelee23 Posted September 14, 2011 Share Posted September 14, 2011 Hi nahlin, thanks for the suggestion. I did actually - and unfortunatley that's what's actually caused the problem - as with my old custom files it seemed to work just fine (but sadly I needed the new versions of the files otherwise I'd quite easily just revert back!) Link to comment Share on other sites More sharing options...
nahlin Posted September 14, 2011 Share Posted September 14, 2011 Uhm, so now that you dont have the newer files, have you tried copying the old Address.php (classes folder)? I would say the problem is there or in one of the controllers (addresscontroller, addressescontroller...). If the identification number appears and then vanish but still being required, probably is on the $fieldsrequired line on Address.php EDIT: Check your themes address.tpl. In my case is about the line 92, between the address title and the first name field. In yours, judging by the picture you posted before it's probably not there (lol). <p class="text"> <input type="hidden" name="token" value="{$token}" /> <label for="company">{l s='Company'}</label> <input type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company|escape:'htmlall':'UTF-8'}{/if}{/if}" /> </p> {if $vat_display == 2} <div id="vat_area"> {elseif $vat_display == 1} <div id="vat_area" style="display: none;"> {else} <div style="display: none;"> {/if} <div id="vat_number"> <p class="text"> <label for="vat_number">{l s='VAT number'}</label> <input type="text" class="text" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{else}{if isset($address->vat_number)}{$address->vat_number|escape:'htmlall':'UTF-8'}{/if}{/if}" /> </p> </div> </div> Deleting or commenting the company part cause the error. The simple solution I can think about is just hidden it, since it's not a required field. Edit 2: It worked. Just replace the first <p class="text"> for <p class="hidden">. No more freakin' invalid tokens or whatever. 2 Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 15, 2011 Share Posted September 15, 2011 Hi Lee, Did nahlin's solution work for you as well? -Mike Link to comment Share on other sites More sharing options...
leelee23 Posted September 15, 2011 Share Posted September 15, 2011 Hi nahlin, I replaced the old Address.php controller file with the new AddressController.php file and sadly a blank page, so presuming the old version isn't entirely compatible with the latest version. I haven't actually commented any of the code in address.tpl - it's all done through the back office for which fields I want to display for the UK. I've also tried changing the <p class="text"> for <p class="hidden"> on DNI / NIF / NIE, VAT number and Company (fields I'm not using anyway) but yet I'm still getting the "Invalid token" error sadly! Appreciate your efforts though! Cheers, Lee Link to comment Share on other sites More sharing options...
nahlin Posted September 16, 2011 Share Posted September 16, 2011 Oh, sorry it didn't work for you. Maybe if you send me your file I could take a look. I know how annoying that error is, it was bothering me for days, would be glad to help. Link to comment Share on other sites More sharing options...
leelee23 Posted September 17, 2011 Share Posted September 17, 2011 Thanks nahlin, that'd be very much appreciated. I'm hoping to make my shop live in the next couple of days, and this is my last remaining issue (that I've noticed) to be resolved. Which files do you want me to send you? Link to comment Share on other sites More sharing options...
nahlin Posted September 17, 2011 Share Posted September 17, 2011 Address.tpl Addresscontroller.php Address.php (classes folder) Whit that is more than enough I guess, the problem is gotta be somewhere in there. 1 Link to comment Share on other sites More sharing options...
leelee23 Posted September 18, 2011 Share Posted September 18, 2011 Here you go - good luck Thanks again for taking a look address.zip 1 Link to comment Share on other sites More sharing options...
nahlin Posted September 18, 2011 Share Posted September 18, 2011 I tried it in my own site, it's fixed now. Just moved the token line out of the company section, now it's on the address section. Good luck with your business! address.zip 6 Link to comment Share on other sites More sharing options...
leelee23 Posted September 18, 2011 Share Posted September 18, 2011 Thank you so much for that nahlin. The odd thing was that I did that based on our previous chat, by removing the code, moving it to the name etc.. but no joy - obviously I put it in the wrong place! Thanks again, very much appreciated - good luck to you to Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 19, 2011 Share Posted September 19, 2011 Thanks nahlin! I will go ahead and mark this as solved. -Mike Link to comment Share on other sites More sharing options...
Bruno Leveque Posted September 20, 2011 Share Posted September 20, 2011 Hi everyone, Thanks a lot for your feedback and your fix. We have fixed this issue, the fix will be integrated on SVN today and available in the upcoming release (v1.4.5). @babyewok: Can you try to apply the fix and confirm that everything sounds good? @leelee23: I'm happy to know that this has worked for you @nahlin: Congrats for your fix ;-) Best regards, Link to comment Share on other sites More sharing options...
lynnetted Posted September 27, 2011 Share Posted September 27, 2011 Hi - I have this same problem and I am relieved to find a solution! Just to make sure I understand what should be done... In the zip file (posted by nahlin) are the following files: Address.tpl Address.php and AddressController.php Address.tpl in located at: themes/[myTheme]/address.tpl Address.php is in the top directory and AddressController.php is in controllers/AddressController.php - is this correct? Thanks! Lynnette Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 27, 2011 Share Posted September 27, 2011 Hi Lynnete, Yes, and all you'll need to do is replace those files with the new ones from the SVN! -Mike Link to comment Share on other sites More sharing options...
lynnetted Posted September 27, 2011 Share Posted September 27, 2011 Thanks Mike - I tried using the zipped files attached earlier and I just get a blank screen - where/what is the SVN? Thanks again! Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 27, 2011 Share Posted September 27, 2011 Here you go! http://svn.prestashop.com/trunk/ -Mike Link to comment Share on other sites More sharing options...
lynnetted Posted September 27, 2011 Share Posted September 27, 2011 Hi - I have this same problem and I am relieved to find a solution! Just to make sure I understand what should be done... In the zip file (posted by nahlin) are the following files: Address.tpl Address.php and AddressController.php Address.tpl in located at: themes/[myTheme]/address.tpl Address.php is in the top directory and AddressController.php is in controllers/AddressController.php - is this correct? Thanks! Lynnette Address.php is in CLASSES not the top folder....my bad also I had to copy and paste the Address.tpl file out of the SVN - either I miss copied the one from the zip file or there was a slight error. Thank you guys so much! Lynnette Link to comment Share on other sites More sharing options...
Juka Posted September 30, 2011 Share Posted September 30, 2011 Thanks it worked perfectly! Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 30, 2011 Share Posted September 30, 2011 I'm glad we could help! -Mike Link to comment Share on other sites More sharing options...
l-goodwin Posted September 20, 2012 Share Posted September 20, 2012 (edited) This also worked for me when I copied the files from the SVN. However, the address form displays slightly different to the original. Is this normal? Edited September 20, 2012 by l-goodwin (see edit history) Link to comment Share on other sites More sharing options...
pmlvfs Posted February 26, 2013 Share Posted February 26, 2013 Worked for me, thank you very much. These little last minute problems are the worse...!!! Link to comment Share on other sites More sharing options...
pluckcarol Posted May 26, 2013 Share Posted May 26, 2013 (edited) Thanks!!! Work with my 1.5.4 Presta Edited May 26, 2013 by pluckcarol (see edit history) Link to comment Share on other sites More sharing options...
sahinb Posted August 1, 2013 Share Posted August 1, 2013 hi i replaced but not saving... Link to comment Share on other sites More sharing options...
vekia Posted August 1, 2013 Share Posted August 1, 2013 what ps version you use? Link to comment Share on other sites More sharing options...
sahinb Posted August 2, 2013 Share Posted August 2, 2013 ok fixed... thanks for your reply Link to comment Share on other sites More sharing options...
vekia Posted August 2, 2013 Share Posted August 2, 2013 thanks for information, may i know where your problem was? Link to comment Share on other sites More sharing options...
sahinb Posted August 2, 2013 Share Posted August 2, 2013 My ps verison is PrestaShop™ 1.5.4.1 İ have been disbaled all country (only i was using my counrty) , and activated all of them again now working 1 Link to comment Share on other sites More sharing options...
vekia Posted August 2, 2013 Share Posted August 2, 2013 nice, quick and easy solution, thanks! 1 Link to comment Share on other sites More sharing options...
chanansh Posted August 6, 2013 Share Posted August 6, 2013 I have the problem again in PrestShop 1.5.4 so I cannot use the old files in the SVN link above... any suggestions? Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 it's a bit old topic, i suggest you to create new topic where you will be able to describe your current issue Link to comment Share on other sites More sharing options...
twiggy Posted November 18, 2013 Share Posted November 18, 2013 I had the same problem and now it is fixed after reading this. Thank you so much! Link to comment Share on other sites More sharing options...
pattila01 Posted November 22, 2013 Share Posted November 22, 2013 (edited) 1.5.3.1 fix: address.tpl; 268. row: {if $field_name eq 'company'} <p class="text"> <input type="hidden" name="token" value="{$token}" /> change: {if $field_name eq 'company'} <p class="text"> {*<input type="hidden" name="token" value="{$token}" />*} and: <input type="hidden" name="token" value="{$token}" /> move to 335. row: {if $field_name eq 'address1'} <p class="required text"> <input type="hidden" name="token" value="{$token}" /> Edited November 22, 2013 by pattila01 (see edit history) 2 Link to comment Share on other sites More sharing options...
Recommended Posts