Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-3144

[PageBuilder] Unable to render LP edit on prod with varnish/ESI

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 3.1.0-beta1, 3.0.4
    • 3.1.0-beta1, 3.0.3
    • None
    • None

    Description

      PageBuilder - Unable to render LP edit on prod with varnish

      blocks rendered by render ESI results with redirect to /login on every ESI fragment, which result with iframe redirect to login

       

      Steps to reproduce:

      1. install ee-demo 3.0   https://github.com/ezsystems/ezplatform-ee-demo/tree/3.0 and set the APP_ENV=prod
      2. install varnish, you can use this substeps:
          2.1 download https://github.com/ezsystems/ezplatform-ee-demo/blob/3.0/.platform/varnish.vcl
          2.2 uncomment at line 8: 

      vcl 4.1;
      import std;

          2.3 replace at line 42:

      set req.backend_hint = app.backend();

               with:

      set req.backend_hint = ezplatform;

          2.4 add at line 25 and replace the ip with your host ip:

      backend ezplatform {
          .host = "192.168.0.2";
          .port = "80";
      }
      

       

          2.5 check your absolute path with pwd command and replace it in the command, run the command

      docker run --name ez-varnish -v /abolute_path/to_your_dir/with_the_file/varnish.vcl:/etc/varnish/default.vcl -p 8080:80 -p 6082:6082 -d plopix/docker-varnish6

          2.6 verify that  maison.yourdomain.tld and maison.yourdomain.tld:8080 works, same with admin.yourdomain.tld and admin.yourdomain.tld:8080
      3. run

      docker exec -it ez-varnish /bin/bash

           inside the container run:

      varnishadm "ban req.url ~ /"

      4. remove the cache 

      rm -rf var/cache/*

      3. go to edit mode of LP  
           expected: you should see blocks nice and shiny, ready to be edited
           current: you will see redirect url in every LP block, and whole iframe redirect to login page after few seconds

      Attachments

        Activity

          People

            Unassigned Unassigned
            damian.zabawa-obsolete@ibexa.co Damian Zabawa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: