CACHE_LIFETIME Error - Uneditable site


Every time I try to put any page in edit mode I get a page crash message “use of undefined constant cache_lifetime - assumed ‘cache_lifetime’ (this will throw an error in a future version of php)”

C5 v8.5.2
PHP 7.3 (was built with 5.7)

Please help!

It’s likely that a block in an add-on, or on that has been directly added to the site in the /application/blocks folder, is using cache_lifetime in a controller.php file.

What I’d suggest is looking through your add-ons and blocks directories for controller.php files for blocks, and seeing if in those files you can spot lines towards the top with this value/text. It’s likely you’d just be able to remove or comment out such lines without impacting anything.

Your error message (or logs, which you could look at directly in the datbase) might actually point you to the exact file triggering the problem.

I have since removed the add-on I had installed initially, but no change. On the stacks error, I have 35 references to various php files and showing on which line. This is completely out of my depths.

Would upgrading to 8.5.5 resolve the issue?

I will try this today and get back to you