GithubHelp home page GithubHelp logo

trive-digital / magento2-varnish-fixes Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 11.0 10 KB

Magento 2 module which fixes issues with cache tags and 503 errors when using Varnish as caching application

Home Page: https://trive.digital

License: MIT License

PHP 100.00%
magento2-extension-free magento2-module varnish

magento2-varnish-fixes's People

Contributors

chombe avatar mmenozzi avatar sambolek avatar wujku avatar zeljkoprsa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

magento2-varnish-fixes's Issues

License info

Hi,

Do you mind adding license info to it?

Thanks.

Please check foreach loop

In aroundSetHeader method, foreach loop for building separate header lines, tagString always collects all tags. ($tags)

Also, if headerLength is not long enough, no header line is added.

Please check fix:
`

    if ($headerLength + strlen($tag) > $this->requestSize - count($tags) - 1) {
        $tagString = implode(',', $newTags);
        $subject->getHeaders()->addHeaderLine($name, $tagString);
        $newTags = [];
        $headerLength = 0;
    }
    $headerLength += strlen($tag);
    $newTags[] = $tag;

`

and after foreach loop:

$tagString = implode(',', $newTags); $subject->getHeaders()->addHeaderLine($name, $tagString);

Full file:
HttpResponseSplitHeader.php.txt

Magento 2.3.1 compatibility

I have installed this on Magento 2.3.1 but it doesn't seem to be doing anything. There are no X-Magento-Tags headers at all after installation.

This module is not compatble with Magento Version - 2.4.6-p4

I tried installing the module with Magento version 2.4.6-p4 and it gives the following error while running setup:di:compile command

Compilation was started.
Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 129.0 MiB
There is an error in /home/891713.cloudwaysapps.com/hwbutvyzva/public_html/vendor/trive/varnish/Model/Http/XMagentoTags.php at line: 10
Interface "Zend\Http\Header\MultipleHeaderInterface" not found#0 /home/891713.cloudwaysapps.com/hwbutvyzva/public_html/vendor/composer/ClassLoader.php(576): include()

Screenshot_2

Magento2 admin dashboard not loading

after admin login magento dashboard is not displaying
it just redirected to this link
localhost/Magento/admin_tiftl1/admin/dashboard/index/key/ce884f1301856652443c35c9de2fc9befbd6971a3b9aa6ab65610a50d293b9dd/
am using
magento 2.0.18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.