jpot Posted September 5, 2014 Share Posted September 5, 2014 When I updated modules in clean Prestashop 1.6.0.9 installation, I got PHP Parse error: syntax error, unexpected T_FUNCTION which blocked front office and back office's modules tab. I think this could be caused by PHP incompatibility in blocktopmenu module's blocktopmenu.php line 1236. My server is PHP 5.2.17 and recent change in this file: https://github.com/PrestaShop/blocktopmenu/commit/7a56e67fbf291b651e87e85825ca0256ca58d892 uses anonymous function which is PHP 5.3+ Prestashop 1.6 is described as PHP 5.1+ so I think this should be avoided. Could someone with proper knowledge check it? If you get your Presta blocked by this update, try commenting lines 1236 - 1238 in /modules/blocktopmenu/blocktopmenu.php - put double slash // at beginings of lines: array_walk($link['label'], function(&$value) { $value = Tools::htmlentitiesDecodeUTF8($value); }); or you can rewrite this code to not use anonymous function or update your PHP version 1 Link to comment Share on other sites More sharing options...
amillen Posted September 5, 2014 Share Posted September 5, 2014 When I updated modules in clean Prestashop 1.6.0.9 installation, I got PHP Parse error: syntax error, unexpected T_FUNCTION which blocked front office and back office's modules tab. I think this could be caused by PHP incompatibility in blocktopmenu module's blocktopmenu.php line 1236. My server is PHP 5.2.17 and recent change in this file: https://github.com/PrestaShop/blocktopmenu/commit/7a56e67fbf291b651e87e85825ca0256ca58d892 uses anonymous function which is PHP 5.3+ Prestashop 1.6 is described as PHP 5.1+ so I think this should be avoided. Could someone with proper knowledge check it? If you get your Presta blocked by this update, try commenting lines 1236 - 1238 in /modules/blocktopmenu/blocktopmenu.php - put double slash // at beginings of lines: array_walk($link['label'], function(&$value) { $value = Tools::htmlentitiesDecodeUTF8($value); }); or you can rewrite this code to not use anonymous function or update your PHP version Having the same issue since updating blocktopmodule to v2.0.3. Commented the lines and now have the top menu back on the front end although the blocktopmenu module is no longer listed on the back end, seems a few people are now having issues since the update. 1 Link to comment Share on other sites More sharing options...
henkkap Posted September 5, 2014 Share Posted September 5, 2014 I've tried this but it won't work for me.. front office blank page. please help me.. Link to comment Share on other sites More sharing options...
sooroos Posted September 5, 2014 Share Posted September 5, 2014 temporary solution would be to install the old version of blocktopmenu v2.0.2 Link to comment Share on other sites More sharing options...
henkkap Posted September 5, 2014 Share Posted September 5, 2014 Hello, How can i get the old version? Link to comment Share on other sites More sharing options...
henkkap Posted September 5, 2014 Share Posted September 5, 2014 Yes, I've fixed it. I did something wrong. For other users: You have to go to your blocktopmenu in your root of your domein. I was trying to do it in themes and that won't work. Thank you for your help. You need to do the changes overhere: /your domain/modules/blocktopmenu NOT HERE: your domain/themes/your theme/modules/blocktopmenu Link to comment Share on other sites More sharing options...
kinocalde Posted September 5, 2014 Share Posted September 5, 2014 I have the same problem, i commented the linea 1236, 1237 and 1238 and work fine. Front page is back. Link to comment Share on other sites More sharing options...
revofire Posted September 5, 2014 Share Posted September 5, 2014 (edited) This this AND THIS. Everything screwed up after hitting that update module button for the top horizontal bar. Whenever you try to load the modules list it just breaks with that error. Will try the fixes listed above now... Edited September 5, 2014 by revofire (see edit history) Link to comment Share on other sites More sharing options...
macius829 Posted September 5, 2014 Share Posted September 5, 2014 Had the same problem. So i just download prestashop files, delete this 'update' module and copy old one from files in prestashop works good, i just need to remember to dont update this module for now. Thats supid no everybody can just go to higher PHP if you have a hosting server... Link to comment Share on other sites More sharing options...
Amriti Posted September 6, 2014 Share Posted September 6, 2014 (edited) If you get your Presta blocked by this update, try commenting lines 1236 - 1238 in /modules/blocktopmenu/blocktopmenu.php - put double slash // at beginings of lines: array_walk($link['label'], function(&$value) { $value = Tools::htmlentitiesDecodeUTF8($value); }); or you can rewrite this code to not use anonymous function or update your PHP version i am having the same problem. www.fashionography.in. just upgraded to prestashop 1.6.0.9. i commented the lines 1236 - 1238 like suggested above. The site comes back online but a lot of thngs dont works. the menu dropdowns dont work, the homeslider doesnt slide, the quick view is gone, product images cant be zoomed, half the product images dont show, the site has lost half its flare! how do i fix this? :-(. have an event planned for tomorrow but cant do it with half a working site :'(. Why did Prestashop have to release a half-cooked update??!! can anyone please help me in fixing this? if nothing else, please guide me how do i rollback the update for this module to go back to the working version??!! @Olivier Please help! Edited September 8, 2014 by Amriti (see edit history) Link to comment Share on other sites More sharing options...
Ehinarr Posted September 6, 2014 Share Posted September 6, 2014 I changed function(&$value) to function($value) ant it worked. Link to comment Share on other sites More sharing options...
oduc78 Posted September 7, 2014 Share Posted September 7, 2014 When I updated modules in clean Prestashop 1.6.0.9 installation, I got PHP Parse error: syntax error, unexpected T_FUNCTION which blocked front office and back office's modules tab. I think this could be caused by PHP incompatibility in blocktopmenu module's blocktopmenu.php line 1236. My server is PHP 5.2.17 and recent change in this file: https://github.com/PrestaShop/blocktopmenu/commit/7a56e67fbf291b651e87e85825ca0256ca58d892 uses anonymous function which is PHP 5.3+ Prestashop 1.6 is described as PHP 5.1+ so I think this should be avoided. Could someone with proper knowledge check it? If you get your Presta blocked by this update, try commenting lines 1236 - 1238 in /modules/blocktopmenu/blocktopmenu.php - put double slash // at beginings of lines: array_walk($link['label'], function(&$value) { $value = Tools::htmlentitiesDecodeUTF8($value); }); or you can rewrite this code to not use anonymous function or update your PHP version Thanks a lot for the tip Jpot, it worked for me: the horizontal meenu is back on the front offcie of my website www.creation-authentic.com/ and the Modules section of the back office is accessible again. Thanks again! Olivier. Link to comment Share on other sites More sharing options...
Amriti Posted September 7, 2014 Share Posted September 7, 2014 When I updated modules in clean Prestashop 1.6.0.9 installation, I got PHP Parse error: syntax error, unexpected T_FUNCTION which blocked front office and back office's modules tab. I think this could be caused by PHP incompatibility in blocktopmenu module's blocktopmenu.php line 1236. My server is PHP 5.2.17 and recent change in this file: https://github.com/PrestaShop/blocktopmenu/commit/7a56e67fbf291b651e87e85825ca0256ca58d892 uses anonymous function which is PHP 5.3+ Prestashop 1.6 is described as PHP 5.1+ so I think this should be avoided. Could someone with proper knowledge check it? If you get your Presta blocked by this update, try commenting lines 1236 - 1238 in /modules/blocktopmenu/blocktopmenu.php - put double slash // at beginings of lines: array_walk($link['label'], function(&$value) { $value = Tools::htmlentitiesDecodeUTF8($value); }); or you can rewrite this code to not use anonymous function or update your PHP version JPot, this is temporary solution, and a lot of things on the home page stop working. it does bring the site back online, and thanks a lot for that. is there any permanent solution, so i can sleep without nightmares of the site crashing again? i read on similar posts, some people changed the entire "Blocktopmenu" folder using ftp. u think that should do it? i'm really technically challenged. having come this far itself is an achievement for me. i dont wanna do something that i cant fix later on. really seeking a permanent solution to this once n for all. Link to comment Share on other sites More sharing options...
hgevet Posted September 8, 2014 Share Posted September 8, 2014 rebonjour en installant la 2.0.4, maintenant, j'ai ca: [PrestaShop] Fatal error in module mdvoucher:syntax error, unexpected T_EXIT hervé Link to comment Share on other sites More sharing options...
Ehinarr Posted September 8, 2014 Share Posted September 8, 2014 rebonjour en installant la 2.0.4, maintenant, j'ai ca: [PrestaShop] Fatal error in module mdvoucher: syntax error, unexpected T_EXIT hervé - Vous devez soumettre de nouveau les fichiers de ce module sur votre serveur. Link to comment Share on other sites More sharing options...
hgevet Posted September 8, 2014 Share Posted September 8, 2014 rebonjour en supprimant le module mdvoucher, tout fonctionne back et front sauf l'appel des modules ou j'ai ca: monsite..../index.php?controller=AdminModules&token=459d12c2ff96adfbe9a3aef783230117 [PrestaShop] Fatal error in module includes.inc:syntax error, unexpected T_STRING merci hervé Link to comment Share on other sites More sharing options...
piyushrkc Posted October 11, 2014 Share Posted October 11, 2014 Hi, after upgradation When i click on modules it shows fatal error and i am not able to find the code anywhere in the file mentioned in this thread If you get your Presta blocked by this update, try commenting lines 1236 - 1238 in /modules/blocktopmenu/blocktopmenu.php - put double slash // at beginings of lines: array_walk($link['label'], function(&$value) { $value = Tools::htmlentitiesDecodeUTF8($value); }); Please advice me what to do ? Thanking you in advance. Link to comment Share on other sites More sharing options...
Recommended Posts