Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: updating from speedy 1.7.0 to 1.9.1 getting errors

Status Resolved
Add-on / Version Speedy 1.9.1
Severity
EE Version 7.4.9

Aasun Eble

Apr 23, 2024

getting PHP errors trying to go into the speedy add-on after updating..

This looks to be similar to another ticket re: speedy 1.9.0 update. Though, since I’m updating to 1.9.1, assumed that upgrade issue would be fixed.

I’ve performed the update multiple times, reverted, followed the install/update docs to delete the static/utilities folder.. tried a few different steps in different orders… nothing is working.

Here’s what I’m doing: 1. upload the new speedy folder into system/user/addons/ 2. delete the static/utilities folder 3. update the speedy add-on from EE Addons 4. go into the speedy settings, expecting to see the “rebuild” notice for utilities and I just get the following PHP errors.

Warning

require_once(/var/www/vhosts/dev2.caratsandcake.com/httpdocs/static/utilities/StaticCacheHelper.php): Failed to open stream: No such file or directory

/var/www/vhosts/dev2.caratsandcake.com/httpdocs/static/default_site/static/index.php, line 13

Severity: E_WARNING Error Caught

Failed opening required ‘/var/www/vhosts/dev2.caratsandcake.com/httpdocs/static/utilities/StaticCacheHelper.php’ (include_path=’phar://user/addons/detour_pro/detour_pro.phar:.:/opt/plesk/php/8.1/share/pear’)

/var/www/vhosts/dev2.caratsandcake.com/httpdocs/static/default_site/static/index.php:13

Stack Trace: Please include when reporting this error

0 user/addons/speedy/Service/Drivers/StaticDriver.php(277): require()

1 user/addons/speedy/Service/Drivers/AbstractDriver.php(72): BoldMinded\Speedy\Service\Drivers\StaticDriver->doFetch()

2 user/addons/speedy/mcp.speedy.php(1310): BoldMinded\Speedy\Service\Drivers\AbstractDriver->getItem()

3 user/addons/speedy/mcp.speedy.php(76): Speedy_mcp->buildDiagnosticsTableData()

4 [internal function]: Speedy_mcp->index()

5 ee/ExpressionEngine/Controller/Addons/Addons.php(1592): call_user_func_array()

6 ee/ExpressionEngine/Controller/Addons/Addons.php(868): ExpressionEngine\Controller\Addons\Addons->getModuleSettings()

7 [internal function]: ExpressionEngine\Controller\Addons\Addons->settings()

8 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array()

9 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController()

10 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run()

11 admin.php(144): require_once(‘…’)

11 admin.php(144): require_once(‘…’)

#1

BoldMinded (Brian)

Are you using an .env.php file?

#2

Aasun Eble

Not sure.. Can you provide more detail? do you mean am I using that in the speedy add-on files? am I using that as part of another/custom add-on? where would this file be located?

#3

BoldMinded (Brian)

Wait, you’re going into the CP and seeing those errors? You’re not seeing them on the front-end? If you’re not seeing those on the front-end and only in the CP, then that sounds like a routing error, or possibly some custom loading of php files. The CP shouldn’t be routing through the index file in the static folder. Are you doing any fancy loading of the index.php or admin.php files? Something custom in your htaccess file perhaps?

#4

Aasun Eble

I see those errors in the CP when navigating to the speedy addon settings.. On the front end, I just get blank pages.. If I delete the existing static file for the page, then it loads.. but then on subsequent loads of that page, I get the blank page. As if speedy is aware that there is a static cache, but it can’t load it.

#5

Aasun Eble

Nothing fancy in nginx config.. typical EE stuff for removing index.php.. some gzip settings, cache-control settings, some rewrites/redirects for some old file downloads from a previous site.. Then just the Speedy stuff.

None of this has changed in 2+ years since EE 7 and speedy was initially set up on this site. There have been some speedy updates since the ~version 1.4 back then.. No issues since the last speedy update to 1.7 back in Nov 2022.

This is the first time attempting a speedy update since then…

#6

BoldMinded (Brian)

Comment has been marked private.

#7

Aasun Eble

No change if I just replace the current (failed) speedy 1.9.1.. Should I revert back to 1.7.0 then use this and try to do the upgrade?

#8

BoldMinded (Brian)

Did you try deleting all of the static cache files too? Not just the utilities folder?

#9

BoldMinded (Brian)

Are you 110% positive the files were updated? I just tried to mimic the error locally and the try/catch I added should not allow the error to be thrown on that line when asking for a file that does not exist.

#10

BoldMinded (Brian)

it was failing on this require line, and this try/catch will prevent the error and write to the log.

try {
            $cache = require $file;
        } catch (\Exception $exception) {
            $this->getLogger()->info(sprintf('Can\'t load %s: %s', $file, $exception->getMessage()));

            throw new ItemNotFoundException();
        }
#11

Aasun Eble

Ok. without reverting or uninstalling.. Keeping the recent 1.9.1 build you sent: 1. I just deleted the entire “static” folder.. not just the “static/utilities” folder. 2. Then I went into the speedy add-on config in the CP and it loaded without error and I was presented with the prompt to rebuild.. I clicked that and the static folder, static/utilities, and static/default_site folders were all recreated. 3. Then I tested loading the site and all seems to be working correctly now.

This all may have just been a mis-understanding/mis-reading of the installation & updating docs.
(actually, I just re-read and it says : “If you’re updating to a newer version or build of Speedy, and using a static cache driver, you will need to re-generate the Cache Utilities files. The easiest way to to do this is to navigate to your /static folder path, and delete the utilities folder, then reload the Speedy settings page in the control panel and you will see a prompt to re-generate those files.”

You should update that to simply, “delete the entire static folder, which includes the static/utilitis and static/default_site (cached files)”

#12

BoldMinded (Brian)

Good catch, I’ll make that update. Glad to hear it’s working again!

Login to reply