AndyC Posted September 27, 2018 Posted September 27, 2018 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
datakick Posted September 27, 2018 Posted September 27, 2018 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
AndyC Posted September 28, 2018 Author Posted September 28, 2018 Ahhhh OK .. Thank you for letting me know ...Site is still under construction anyway
the.rampage.rado Posted September 29, 2018 Posted September 29, 2018 The Full caching is still broken as of 1.0.7 so disable it and continue with your site.
Pilou Posted September 29, 2018 Posted September 29, 2018 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
datakick Posted September 29, 2018 Posted September 29, 2018 @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
Pilou Posted September 29, 2018 Posted September 29, 2018 Oh ok, for php7.2, I just read it was compatible in the post talking about 1.07.
datakick Posted September 29, 2018 Posted September 29, 2018 @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.
Traumflug Posted September 29, 2018 Posted September 29, 2018 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.
datakick Posted September 29, 2018 Posted September 29, 2018 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now