alaa
September 19, 2018, 12:00am
#1
Hello,
I hope you will help me with this issue.
I found out that the browser window shows HTML code instead of the page title. In view page source, I found the following code located in the page header section within the title tag:
PHP Warning Message array_reverse() expects parameter 1 to be array, null given
Error at app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code, line: 56
Backtrace
File:
app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
Line:
56
Function:
{closure}
File:
app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line:
188
Function:
content_5ba274479f0b52_18898835
File:
app/Tygh/SmartyEngine/Core.php
Line:
76
Function:
fetch
File:
app/functions/fn.control.php
Line:
618
Function:
fetch
File:
index.php
Line:
25
Function:
fn_dispatch
Online Shopping Website.
After pasting the above code in an html file, I see this message: https://prnt.sc/kwawm6
I did the following to get rid of this error with no luck:
Disabled all third party addons.
Switched back to default CS-Cart themes.
Deleted cache folder in /var/
Recreated new layout.
Anyone has experienced like this issue?
Note: This error shows only when I open the store in my language (Arabic). English language is fine.
What is the possiblity that it is a bug in CS-Cart even though I couldn't reproduce the error in demo.cs-cart.com
Thank you in advance!
Hello.
Do you have many of these addon from other companies ?
I would try to execute the command
cd /design/themes/responsive/templates/addons
grep -r "array_reverse" ./
Best regards
Robert
alaa
September 19, 2018, 12:00am
#3
Thank you for your suggestion.
I executed the command but found nothing. I use just 4 addons from thirdparties.
Also, I tried after disabling the addons. Still get this error.
Hello
How do I understand using the responsive theme? Do you have any other installed?
If so, execute the grep command in the graphical theme you are using.
Best regards
Robert.
alaa
September 19, 2018, 12:00am
#5
The command returns no results. I don't know if I am performing it the right way.
As I mentioned earlier, I have switched back to default responsive theme and disabled all addons. Do I still need to search for array_reverse in my custom theme?
Hello.
Do you have access to ssh on the server where is the store?
Best regards
Robert.
alaa
September 19, 2018, 12:00am
#7
Yes, I performed the grep command using ssh after navigating to the correct theme directory. My store is on CentOS7 on VPS.
The error message only on the homepage. Other pages are fine.
Try to disable blocks on home page layout one by one
alaa
September 20, 2018, 12:00am
#9
I did disable all blocks. The homepage now is totally blank with no single letter. Still, the below rubbish shows in the window browser as a title.!
PHP Warning Message array_reverse() expects parameter 1 to be array, null given
Error at var/cache/templates/responsive/40c4a62d1405e59112ce025f5a5c3c9289dd410a.tygh.index.tpl.php, line: 56
Backtrace File: var/cache/templates/responsive/40c4a62d1405e59112ce025f5a5c3c9289dd410a.tygh.index.tpl.php Line: 56 Function: {closure} File: app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php Line: 188 Function: content_5ba287d2958df5_12370799 File: app/Tygh/SmartyEngine/Core.php Line: 76 Function: fetch File: app/functions/fn.control.php Line: 618 Function: fetch File: index.php Line: 25 Function: fn_dispatch
Shopping Cart Software & Ecommerce Software Solutions by CS-Cart
alaa
September 20, 2018, 12:00am
#10
Deleted cache folder and did clear cache in the admin panel, with no luck!
Hello.
Is the same error on other pages too? e.g.
index.php?dispatch=products.view&product_id=your_id
or on page categories ?
Please try disable block (step by step) in "Default" in Layout
Best regards
Robert.
ecomlabs
September 20, 2018, 12:00am
#12
Please check if array_reverse function is called here
design/themes/responsive/templates/index.tpl