Comments (3)
As far as I know that MASTER_REQUEST is deprecated. I tried a fresh Drupal setup with the cache plugin and it seems no issue. Do you have any test site to uninstall the cache plugin, and install the latest version for testing porpuses and see if there's any issue?
from lscache-drupal.
I've installed v1.3 onto a newly setup Drupal 9 and encountered the same issue.
[10-Aug-2023 03:51:14 UTC] Error: Undefined constant Drupal\lite_speed_cache\StackMiddleware\LiteSpeedCache::MAIN_REQUEST in /home/foobar/web/modules/contrib/lscache-drupal/src/StackMiddleware/LiteSpeedCache.php on line 109 #0 /home/foobar/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\lite_speed_cache\StackMiddleware\LiteSpeedCache->handle()
#1 /home/foobar/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#2 /home/foobar/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#3 /home/foobar/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#4 /home/foobar/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#5 /home/foobar/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#6 /home/foobar/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#7 {main}
Line 109 of LiteSpeedCache.php is this line:
if ($type === static::MAIN_REQUEST && $this->requestPolicy->check($request) === RequestPolicyInterface::ALLOW) {
the const LiteSpeedCache::MAIN_REQUEST
is supposedly inherited from Symfony's HttpKernelInterface, but the attribute was only renamed from MASTER_REQUEST to MAIN_REQUEST since version 5.3:
Drupal 9.5.10 has a dependency on "symfony/http-kernel": "^4.4". Which means the HttpKernelInterface in Drupal 9 is still using the old MASTER_REQUEST reference. Not MAIN_REQUEST. So the current v1.3 lscache-drupal only works with Drupal 10 with Symfony 5.3+.
For backward compatibility purpose, I think the class Drupal\lite_speed_cache\StackMiddleware\LiteSpeedCache
should explicitly declare public const MAIN_REQUEST = 1;
within it.
from lscache-drupal.
Seems this has been taken care of in 310e4bd.
Please create a new release with that as soon as possible. Thanks.
from lscache-drupal.
Related Issues (17)
- Drupal 8.6.x issue: TypeError: Argument 2 passed to Drupal\page_cache\StackMiddleware\PageCache::storeResponse() HOT 5
- You are referring to page cache and not dynamic page cache.
- Drupal 8.8.0 : TypeError: Argument 2 passed to Drupal\page_cache\StackMiddleware\PageCache::storeResponse() HOT 2
- Drupal 9 compability HOT 2
- Tags based invalidation not working because LSCacheTagsInvalidator::$tags gets overwritten
- Is there a Drupal 7 version available of this module? HOT 1
- Works only on the homepage HOT 1
- composer problem
- Upgrade problem HOT 2
- Add setting to exclude URLs/pages from caching HOT 1
- Drupal 10 compatibility HOT 3
- Class " Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy" does not exist
- Feature Request: Vary cache based on Drupal user roles
- Upgrade for Drupal 10 HOT 1
- Drupal messages
- After upgrading to D10, css/js are broken on some pages HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lscache-drupal.