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: Fragment caching stops working in version 1.9.1

Status With Customer
Add-on / Version Speedy 1.9.1
Severity
EE Version 7.4.2

University Communications

Apr 24, 2024

Description of the problem Hi, After installing version 1.9.1 (also 1.9.0), pages with fragment caching tags stopped caching. Static caching still works. Currently version 1.8.1 still works for us and is what we’re still using.

I’ve tried to debug in my local environment, as you suggest, by uninstalling all other add-ons and stripping down the template code to the bare minimum, but the issue persists.

Additionally, there is some strange behavior which only occurs when the user is LOGGED IN to the EE control panel. I’ve tried everything to debug this but am a loss, and am hoping that any of this behavior rings a bell with you.

Error Messages [WHEN LOGGED IN AND DEBUG IS TURNED ON:] Notice: Constant SYSPATH already defined in /Users/ptn045/Sites/ucsdnews/index.php on line 131

Warning: Use of undefined constant REQ - assumed ‘REQ’ (this will throw an Error in a future version of PHP) in /Users/ptn045/Sites/ucsdnews/maserati/ee/legacy/core/Exceptions.php on line 85 Notice Constant APPPATH already defined ee/ExpressionEngine/Core/ExpressionEngine.php, line 23

Severity: E_NOTICE

[WHEN LOGGED IN AND DEBUG IS TURNED OFF:] (page does not load, displays a white screen and this error appears in the browser console) net::ERR_CONTENT_DECODING_FAILED 200 (OK)

Screenshots / Videos / Template Code Here are the tags we use for fragment caching:

{exp:speedy:fragment key="frag"}
    {exp:channel:entries
        channel="news_releases|features|story"
        limit="1"
        show_future_entries="yes"
        dynamic="yes"
        require_entry="yes"
        status="Open|Draft"
        disable="member_data|pagination|category_fields"
    }

        {modules_feature-detail-hero}
        {modules_feature-detail-wysiwyg}

    {/exp:channel:entries}
{/exp:speedy:fragment}

Environment Details: - PHP Version 7.4 - MySQL Version: MariaDB 11.3.2 - OS: Linux - Web Server: Apache

Thank you!

#1

BoldMinded (Brian)

Hello. It helps to know what cache driver you’re using? Database, File, Redis??

#2

BoldMinded (Brian)

Also, how are you config files setup? Are you using Master Config or anything custom? Are you using the .env.php file?

#3

University Communications

We’re using the Redis driver and the config setup uses the standard config.php file, nothing custom. We’ve never used Master Config or .env.php

#4

BoldMinded (Brian)

If you’re getting a white screen, follow these steps: https://boldminded.com/white-screen

#5

University Communications

——– With DEBUG = 2 turned on in config.php I get these errors ——–

Severity: E_DEPRECATED Deprecated Redis::connect(): Passing null to parameter #2 ($port) of type int is deprecated user/addons/speedy/Service/Drivers/RedisDriver.php, line 66

Severity: E_DEPRECATED Warning Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120) ee/ExpressionEngine/Boot/boot.common.php, line 478

——– With DEBUG = 1 turned on in index.php I get these errors ——–

Warning: Constant SYSPATH already defined in /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/index.php on line 131

Fatal error: Uncaught Error: Undefined constant “REQ” in /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/maserati/ee/legacy/core/Exceptions.php:85 Stack trace:

0 /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/maserati/ee/ExpressionEngine/Boot/boot.common.php(514): EE_Exceptions->show_php_error() #1 [internal function]: _exception_handler() #2 /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/maserati/ee/ExpressionEngine/Core/ExpressionEngine.php(23): define() #3 /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/maserati/ee/ExpressionEngine/Boot/boot.php(114): ExpressionEngine\Core\ExpressionEngine->boot() #4 /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/index.php(164): require_once(‘…’) #5 /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/index_redis_default_site.php(43): require_once(‘…’) #6 {main} thrown in /home/ucsdstage/domains/stage-today.ucsd.edu/public_html/maserati/ee/legacy/core/Exceptions.php on line 85

——– With the advanced debugging script I get these errors ——–

E_DEPRECATED Error in file index_redis_default_site.php at line 148: Redis::connect(): Passing null to parameter #2 ($port) of type int is deprecated

#6

BoldMinded (Brian)

What version of PHP and Redis are you using?

#7

University Communications

PHP 8.2 Redis 7.2.4

#8

BoldMinded (Brian)

and what does your Redis config look like?

#9

BoldMinded (Brian)

It’s complaining about a port value… have you tried modifying your config in any way to fix the issue?

#10

University Communications

Here’s the Redis config, but it uses sockets instead of ports. I’ll try some different port values to see if that does anything:

$config['speedy_redis_settings'] = [
    'static' => 'yes',
    'servers' => [
        [
            'host' => '/home/ucsdstage/.redis/redis.sock',
            'port' => null,
            'timeout' => '0',
            'password' => null
        ]
    ],
    'ignore_urls' => [
        ['url' => 'maserati']
    ]
];
#11

BoldMinded (Brian)

Try the default port of 6397 or whatever the default is.

Login to reply