Jump to content
thirty bees forum
  • 0

Updated from TB 1.3 to 1.4 then went from PHP7.4 to PHP8.1 to verify modules compatibility, some not compatible, now can't go back to PHP7.4...



Hello people

I am working on a test site and updated my Thirtybees version 1.3 to 1.4.

Did the core updater also for database and applied all the fixes and all good.

I wanted to check older Prestashop modules compatibility under PHP8.1 from PHP7.4 to see if they would also be compatible, the core updater said that I needed to updated the Thirtybees so I did.

Some of my older modules are not PHP8.1 compatible,  so now, if I go back to my host and set my site back to PHP7.4, I get this error message when accessing my backoffice: "Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". "

So now the only way to have access to my backoffice is to set my shop to be on version PHP8.1, no way to go back to PHP7.4, this basically broke my shop that was working fine under PHP7.4 with Thirtybees 1.4.


Any advise to solve this problem would be appreciated.






Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
6 minutes ago, papagino said:

Your Composer dependencies require a PHP version ">= 8.1.0"

Isnt there a file, that states this error? Probably you can edit this file and it will work again. Not the nicest fix idea, but maybe a quick win.

Maybe afterwards you should redo the core updater under php 7.4.

Please also tell, which modules aren't compatible. That may help other customers too...

Link to comment
Share on other sites

  • 0
3 minutes ago, wakabayashi said:

Isnt there a file, that states this error? Probably you can edit this file and it will work again. Not the nicest fix idea, but maybe a quick win.

Maybe afterwards you should redo the core updater under php 7.4.

Please also tell, which modules aren't compatible. That may help other customers too...

Yea, that's the thing, not sure what file to edit for the error...

Some of the Prestashop modules that I can confirmed are not compatible with PHP8.1 are:

- Creative Slider v6.6.9 - by WebshopWorks

- Canada Post Shipping - by Presto-Changeo

- Fedex Shipping - by Presto-Changeo

I probably have more PS modules that aren't compatible with PHP8.1 but since those were the more important, I want to go back to PHP7.4, but not sure how to do it...


Any advise on how to go back to PHP7.4 would be appreciated.




Link to comment
Share on other sites

  • 0
14 minutes ago, datakick said:

While you are still running your store on PHP8.1, go to core updater settings, and change target PHP version to 7.4. Then perform update -- that will replace libraries with version compatible with PHP74.

Then you can safely downgrade your PHP version.  


So easy when you know what you are doing...

Thank you very much, that worked wonderfully...





Link to comment
Share on other sites

  • 0
28 minutes ago, Joint Systems said:

What i f you can no longer get into modules and services to get to the core updater settings to change back to 7.4? 

That would be unfortunate. This is actually one of the main reasons why we need to implement core updater to be independent on tb core. Unfortunately, that's still not the case.

If you can't access the modules page, you would have to perform the php downgrade manually. You can go to https://thirtybees.com/download-specific/ and download zip file for your target php version (7.4). You can then unzip it to your server installation. All you have to care about is the /vendor directory, actually.

  • Like 1
Link to comment
Share on other sites

  • 0

To prevent such unwanted issue, I can give you this adivse:

  • First make a clone of your current system. Long time ago I created a video tutorial (Offtopic: wtf it has over 1150 views!?), one part is about cloning
  • If you can, make the clone with a subdomain.
  • If you can, only switch the php version of the subdomain.

In my case this was possible. It's probably depending on your hosting subscription. It helps to test without any risk at all.


Link to comment
Share on other sites

  • 0

This is how I fixed it: Since we have numerous shops running TB some of them were still running the Bleeding edge version of 1.3 (1.4) prior to release or the new upgrade. " New module verion is available  You are using an outdated version 1.60 of core updater module"  This old verision however worked when set in the bleeding edge verision.  So I went to one of the stores that was running the old core updater 1.6 module and copied it to one of the stores that no longer worked.  I then went to the store and was able get into modules and settings and went to the core updater which was set at the choice update which using the drop down icon  switched to configure.  Went in and changed it to stable rather tha bleeding edge and saved it. then I went to core updater in the preferences and ran that so i was now back to 1.4, then I switched the PHP version back to 7.4 and the store was now back online.  P.S.  it also works with the old 1.6 version of core updater module set to the bleeding edge mode and the core updater in preferences run with that setting.


Link to comment
Share on other sites

  • 0

Hello,  i also want to upgrade to tb 1.4  and i can make an php-update too,  maybe php 7.4  would be good.  OK, so i tried it but with no luck.

In core updater settings, i choose php 7.4 and saved it, then i have changed the php version on server to 7.4 with all recommended extensions (as before),   then there was an error and i cant get into the modules catalogue,  so i have downloaded the  /vendor  for 1.4 and php 7.4  as written above  @datakick 

Now i get the following error and still can´t get into modules catalogue:


Call to undefined function mb_regex_encoding()

in file /home/abcfolder/public_html/vendor/smarty/smarty/libs/plugins/shared.mb_str_replace.php at line 47
28:                $string = smarty_mb_str_replace($search, $replace, $string, $c);
29:                $count += $c;
30:            }
31:        } elseif (is_array($search)) {
32:            if (!is_array($replace)) {
33:                foreach ($search as &$string) {
34:                    $subject = smarty_mb_str_replace($string, $replace, $subject, $c);
35:                    $count += $c;
36:                }
37:            } else {
38:                $n = max(count($search), count($replace));
39:                while ($n--) {
40:                    $subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);
41:                    $count += $c;
42:                    next($search);
43:                    next($replace);
44:                }
45:            }
46:        } else {
47:            $mb_reg_charset = mb_regex_encoding();
48:            // Check if mbstring regex is using UTF-8
49:            $reg_is_unicode = !strcasecmp($mb_reg_charset, "UTF-8");
50:            if(!$reg_is_unicode) {
51:                // ...and set to UTF-8 if not
52:                mb_regex_encoding("UTF-8");
53:            }
55:            // See if charset used by Smarty is matching one used by regex...
56:            $current_charset = mb_regex_encoding();
57:            $convert_result = (bool)strcasecmp(Smarty::$_CHARSET, $current_charset);
and Stack trace:
1. vendor/smarty/smarty/libs/plugins/modifier.replace.php:34 source smarty_mb_str_replace(arguments)
2. admin1234/themes/default/template/helpers/kpi/kpi.tpl source smarty_modifier_replace(arguments)
3. vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123 source content_659332dfa95ff8_73132224(arguments)
4. vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114 source Smarty_Template_Resource_Base->getRenderedTemplateCode(arguments)
5. vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216 source Smarty_Template_Compiled->render(arguments)
6. vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:238 source Smarty_Internal_Template->render(arguments)
7. vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116 source Smarty_Internal_TemplateBase->_execute(arguments)
8. classes/SmartyCustom.php:555 source Smarty_Internal_TemplateBase->fetch(arguments)
9. classes/SmartyCustom.php:530 source Smarty_Custom_Template->fetchWithRetries(arguments)
10. classes/helper/HelperKpi.php:88 source Smarty_Custom_Template->fetch()
11. controllers/admin/AdminModulesController.php:767 source HelperKpiCore->generate()
12. controllers/admin/AdminModulesController.php:524 source AdminModulesControllerCore->renderKpis()
13. classes/controller/Controller.php:215 source AdminModulesControllerCore->initContent()
14. classes/Dispatcher.php:861 source ControllerCore->run()
15. admin1234/index.php:58 source DispatcherCore->dispatch()
Is there any help please? 
edit:  sorry - i have solved this, all to do for this error was to enable  mbregex extension  (this was included in php 7.2,  but not in php 7.4,  i have to include it manually  😞  ) 
Edited by DRMasterChief
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...