Jump to content

blocktopmenu - PHP version incompatibility after update


jpot

Recommended Posts

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 :)

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

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

 

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 by Amriti (see edit history)
Link to comment
Share on other sites

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

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

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

  • 1 month later...

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

×
×
  • Create New...