Upgrade PHP 7.4 to 8.0.3 issues

Hello,

I recently upgraded my website to CS-Cart version 4.17 and decided to update the PHP version from 7 to 8. However, after this update, I encountered numerous bugs in the core files, and now I’m unable to access both the website and the admin panel.

Aside from upgrading to the latest CS-Cart version, are there any additional requirements or steps I should be aware of to make CS-Cart compatible with PHP 8?

Thank you for your assistance.

It should be compatible. I would guess that extension(s) were not installed when upgrading to PHP 8.0.?

Post the errors and someone may be able to help.

May be these errors are form 3rd party modules not compatible with php 8 ?

1 Like

TypeError

Message
Illegal offset type

Error at
app/Tygh/BlockManager/Block.php, line: 892

Backtrace
File:app/Tygh/BlockManager/RenderManager.php
Line:812
Function:getItems

File:app/Tygh/BlockManager/RenderManager.php
Line:666
Function:getValue

File:app/Tygh/BlockManager/RenderManager.php
Line:493
Function:renderBlockContent

File:app/Tygh/BlockManager/RenderManager.php
Line:415
Function:renderBlock

File:app/Tygh/BlockManager/RenderManager.php
Line:373
Function:renderBlocks

File:app/Tygh/BlockManager/RenderManager.php
Line:230
Function:renderGrid

File:app/Tygh/BlockManager/RenderManager.php
Line:200
Function:renderGrids

File:app/Tygh/BlockManager/RenderManager.php
Line:164
Function:_renderContainer

File:app/functions/smarty_plugins/function.render_location.php
Line:52
Function:render

File:var/cache/templates/vivashop/1a0c644338b5edaaa91866149fe562e40e33507b_2.tygh.et_content.pre.tpl.php
Line:53
Function:smarty_function_render_location

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650a2c5b16ced3_10584357

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:238
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:116
Function:_execute

File:app/functions/smarty_plugins/block.hook.php
Line:129
Function:fetch

File:var/cache/templates/vivashop/7fe6ce91e08fe1b6f27b126c3a7fd3b9bad7382b_2.tygh.index.tpl.php
Line:163
Function:smarty_block_hook

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650a2c5a0b4d93_10135607

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:238
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:116
Function:_execute

File:app/Tygh/SmartyEngine/Core.php
Line:81
Function:fetch

File:app/functions/fn.control.php
Line:632
Function:fetch

File:index.php
Line:19
Function:fn_dispatch

TypeError

Message
array_keys(): Argument #1 ($array) must be of type array, string given

Error at
app/addons/advanced_addon/controllers/backend/index.post.php, line: 25

Backtrace
File:app/addons/advanced_addon/controllers/backend/index.post.php
Line:25
Function:array_keys

File:app/functions/fn.control.php
Line:722
Function:include

File:app/functions/fn.control.php
Line:458
Function:fn_run_controller

File:CvmORvU06X1SNEBE.php
Line:27
Function:fn_dispatch

TypeError

Message
Cannot access offset of type string on string

Error at
var/cache/templates/backend/a3e155692c80499316d2c042a48494b30af57e86_2.tygh.image.pre.tpl.php, line: 28

Backtrace
File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650b5524df0190_73312026

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:238
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:116
Function:_execute

File:app/functions/smarty_plugins/block.hook.php
Line:129
Function:fetch

File:var/cache/templates/backend/7ebcdfdf6235df2fb54a0f967971cadc38ac1b39_2.tygh.image.tpl.php
Line:53
Function:smarty_block_hook

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650b55257dea23_52642250

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:385
Function:render

File:var/cache/templates/backend/e48bef453e9b0247ba9c79f3bdcecb02b363e0db_2.tygh.presets.tpl.php
Line:85
Function:_subTemplateRender

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650b55257a8861_78838994

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:385
Function:render

File:var/cache/templates/backend/48f995a147def9f608382f35b631149418a9d81f_2.tygh.mainbox.tpl.php
Line:242
Function:_subTemplateRender

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650b55255f6776_46030042

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:385
Function:render

File:var/cache/templates/backend/fbe7f9ec6252553c3089bebf105c5c40088dd804_2.tygh.index.tpl.php
Line:53
Function:_subTemplateRender

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650c3352298d87_40879629

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:385
Function:render

File:var/cache/templates/backend/bb411b67022eab7c33a2a7a266a90b5257547f9c_2.tygh.index.tpl.php
Line:128
Function:_subTemplateRender

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php
Line:123
Function:content_650b5523634224_23286521

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
Line:114
Function:getRenderedTemplateCode

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
Line:216
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:238
Function:render

File:app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:116
Function:_execute

File:app/Tygh/SmartyEngine/Core.php
Line:81
Function:fetch

File:app/functions/fn.control.php
Line:632
Function:fetch

At first contact EnergoThemes (responsible for the et_content.pre.tpl file) and developer of the advanced_addon module

1 Like

I also upgraded to PHP 8 from PHP 7.4 and I’m encountering the same issues in my Nginx log and PHP slow log. I get the same issues (RenderManager.php). Its made CPU utilization very high and made the website slow. I use Multivendor 4.16.2 Unitheme 2.
If you find out the cause, please share it.

advanced_addon comes with cs-cart

I’m still working on resolving the issue, and here’s what I’ve discovered so far: The website homepage loads correctly when accessed in English, but when attempting to access it in Portuguese (which is the default language), it triggers the template bug.

Hello!

I recommend you to contact us via Help Desk on this case, we will try to help you. Please note that if you are not already subscribed, you may need to subscribe to Customer Care in order for our team to be able to assist you.