debugCacheabilityHeaders fatal error wile installing module on drupal 11

Created on 24 October 2024, 29 days ago

Problem/Motivation

I get a fatal error wile I'm installing adv_varnish on d11. Apparently it's related to $http_response_debug_cacheability_headers = FALSE which is not interpreted as a boolen.

Website freezes.

With d10 I don't get the error and the adv_varnish module is working.

The server is running on Ubuntu with php 8.3 from sury's ppa.

That's the error log :

[error] 3158#3158: *587 FastCGI sent in stderr: "PHP message: PHP Fatal error: Type of Drupal\adv_varnish\EventSubscriber\CacheableResponseSubscriber::$debugCacheabilityHeaders must be bool (as in class Drupal\Core\EventSubscriber\FinishResponseSubscriber) in /var/www/sites/zaira/web/modules/contrib/adv_varnish/src/EventSubscriber/CacheableResponseSubscriber.php on line 0" while reading response header from upstream, client: 127.0.0.1,

Steps to reproduce

Use default.vcl from adv_varnish module, install d11and install adv_varnish module.

Does someone have any clue to resolv that problem ?

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇫🇷France reweb /dev/random

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @reweb
  • First commit to issue fork.
  • Merge request !21fixed fatal error for drupal 11 → (Merged) created by Unnamed author
  • Pipeline finished with Failed
    15 days ago
    Total: 164s
    #330920
  • 🇮🇳India sarwan_verma

    Hi,

    I have resolved the "debugCacheabilityHeaders fatal error" issue for Drupal 11 and created MR!21.
    Please review and verify.

    Thank you!

  • 🇫🇷France reweb /dev/random

    The fix is not working for me.

    I got :

    2024/11/12 09:40:50 [error] 2173#2173: *154 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception TypeError: "Drupal\Core\EventSubscriber\FinishResponseSubscriber::__construct(): Argument #6 ($time) must be of type Drupal\Component\Datetime\TimeInterface, false given, called in /var/www/sites/drupal/web/modules/contrib/adv_varnish/src/EventSubscriber/CacheableResponseSubscriber.php on line 89" at /var/www/sites/drupal/web/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php line 50" while reading response header from upstream, client: 127.0.0.1, server: adv_module, request: "GET /admin/modules HTTP/1.0", upstream: "fastcgi://unix:/var/run/php/drupal.sock:", host: "192.168.1.175"

  • First commit to issue fork.
  • 🇫🇷France reweb /dev/random

    It's not changing anything. I get the same error posted in #5

  • 🇵🇱Poland shumer Wroclaw

    @reweb
    try the udpated branch it works for me both D10 and D11

  • 🇫🇷France reweb /dev/random

    I'm on the same d11 branch that you're. With d10 it's working for me too.

  • 🇵🇱Poland shumer Wroclaw

    What type of freezes? Like a page timeout? Can you please share PHP error with me.

  • 🇫🇷France reweb /dev/random

    It's being working.

    I didn't see all modifications you did with your commit. My mistake.

    Thanks.

  • 🇵🇱Poland shumer Wroclaw

    @reweb, so all works for you D10 and D11? I'm thinking of merger that PR and make a new release. Looking for confirmation that that works not only for me.

  • 🇫🇷France reweb /dev/random

    @shumer Yes it all works on d11, but on d10 I didn't test your commit.

  • 🇵🇱Poland shumer Wroclaw
Production build 0.71.5 2024