EE compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field.

ExpressionEngine.com licenses:

  • 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: Error saving entry when Speedy is enabled

Status Resolved
Add-on / Version Speedy 1.3.0
Severity
EE Version 6

Chad Nelson-Toohey

Dec 23, 2020

I have speedy enabled and when trying to save an entry I receive the following error :

“Argument 1 passed to Speedy_ext::after_channel_entry_save() must be an instance of EllisLab\ExpressionEngine\Model\Channel\ChannelEntry, instance of ExpressionEngine\Model\Channel\ChannelEntry given, called in ee/legacy/libraries/Extensions.php on line 222”

If I am guessing, it seems like it is looking for the EllisLab\ExpressionEngine\ directory which is removed and replaced with just \ExpressionEngine\ in 6.0. I am not sure if maybe I installed the wrong version of Speedy or if I just need to edit some configuration files in the add-on. Thoughts?

#1

BoldMinded (Brian)

Dec 23, 2020

Try adding this to the addon.setup.php file in the speedy folder.

if (defined('APP_VER') && version_compare(APP_VER, '6.0', '>=')) {
    $classNames = [
        'ExpressionEngine\Model\Channel\ChannelEntry',
        'ExpressionEngine\Model\Comment\Comment',
    ];

    foreach ($classNames as $className) {
        if (!class_exists('EllisLab\\' . $className)) {
            class_alias('EllisLab\\' . $className, $className);
        }
    }

    unset($classNames, $className);
}
#2

Chad Nelson-Toohey

Dec 23, 2020

Awesome, that seems to have fixed the issue! I am also running into a bit of a problem with static caching using redis. Should I just continue with you here or open another ticket for that one?

#3

BoldMinded (Brian)

Dec 23, 2020

I’d prefer a new ticket if you don’t mind. Be sure to include screenshots of your Speedy settings, any error messages etc. I need to be able to replicate it locally… whatever it is.

Login to reply