Jump to content
thirty bees forum

Recommended Posts

Posted

Hi Have upgraded my website to 1.0.7 and while turning back on cache I got this error pop up Any idea as to what it is

**********Warning on line 265 in file /var/sites/p/mywebsitedomain.co.uk/public_html/classes/PageCache.php [2] Invalid argument supplied for foreach()**********

TIA

Posted

Ohh, that's a bug. Fortunately it's nothing serious. It just means that there's no settings for full page cache hooks in the tb_configuration table.

You can safely ignore this warning. If you have debug mode enabled, then it's probably hard to do, though. Note that you should never enable debug mode in production environment.

To get rid of this warning completely, simply follow these steps:

1) go to Advanced Parameters > Performance, 2) find section Full Page Cache 3) turn on and off any one of the displayed hooks.

This will create the missing setting option in configuration table, and the warning will no longer be in the log. Sorry for the trouble, folks

0_1538085446036_210baf43-153e-4c2c-abe9-735a82774fd5-image.png

Posted

Hello,

Full page cache is disabled but still same error.

Warning à la ligne 265 du fichier /home/www/********/classes/PageCache.php [2] Invalid argument supplied for foreach()

and also another one.

Unknown error à la ligne 75 du fichier /home/www/********/vendor/smarty/smarty/libs/sysplugins/smartyinternalcompilebase.php [8192] The each() function is deprecated. This message will be suppressed on further calls

Kind regards PIlou

Posted

@pilou said in Error message about Cache:

Warning à la ligne 265 du fichier /home/www/********/classes/PageCache.php [2] Invalid argument supplied for foreach()

To get rid of this warning, follow steps described above

Unknown error à la ligne 75 du fichier /home/www/********/vendor/smarty/smarty/libs/sysplugins/smartyinternalcompilebase.php [8192] The each() function is deprecated. This message will be suppressed on further calls

This is unrelated. You are probably using php 7.2, right? Thirtybees is no yet compatible with that php version

Posted

@pilou said in Error message about Cache:

Oh ok, for php7.2, I just read it was compatible in the post talking about 1.07.

It still isn't.

At the moment, thirtybees still uses rather archaic version of the smarty (3.1.19) that does not support php 7.2 properly. Because of few bugs in tb core code, it was not possible to upgrade smarty to newer version -- it throwed 500 errors on php72. These bugs were fixed in 1.0.7, so it's now possible to upgrade smarty to newer version.

Upgrading smarty to newer version is considered to be (potentially) breaking changes, so it's not part of this 1.0.7 release.

You can upgrade smarty to newer version yourself, and let us know how it works for you. Whether you encountered any bugs or issues, or if it's working correctly. Just don't upgrade to newest version 3.1.33, as it contains this bug. I've tested smarty on 3.1.31 and it seems to be working just fine.

Posted

Because of few bugs in tb core code, it was not possible to upgrade smarty to newer version

Uhm, these bugs can get fixed. The more problematic area is compatibility with themes and modules, which is the actual reason why Smarty is still the four years old version. Plan is to shift focus from "compatibility with modules" to "compatibility with PHP" at the end of this year. With keeping module compatibility as much as possible, of course, but not at all costs.

Posted

Smarty syntax should be compatible, so unless the module developer used some undocumented / unofficial syntax in their templates, the ugrade to the newer version should be fine.

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...