Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23930

Adapt HttpCache to comply FOSHttpCacheBundle 1.2

    Details

      Description

      Only affects built-in Symfony reverse proxy, aka HttpCache

      A BC break has been introduced in FOSHttpCacheBundle 1.2.0:

      BC break: If you overwrite cleanupForwardRequest in your cache kernel, you need to extend FOS\HttpCache\SymfonyCache\UserContextSubscriber and move that logic to the method cleanupHashLookupRequest in there.

      cleanupHashLookupRequest() method was initially located in base HttpCache class and was overridden by eZ implementation to embed original request (for siteaccess matching). Original location being now absent, cache is reacting erratically, i.e. with user context hash cache.

      This can cause wrongly shared Http caches.

        Issue Links

          Activity

          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Blocking EZP-23927, avoiding Behat tests to pass.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Blocking EZP-23927 , avoiding Behat tests to pass.
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/fbdddab8d51c34196e50a74683e0ae39cea26882
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Tagged new releases:

          • v5.4.1.1
          • v2015.01.1
          • v2014.11.8

          Composer update is needed.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Tagged new releases: v5.4.1.1 v2015.01.1 v2014.11.8 Composer update is needed.
          Hide
          Rui Silva (Inactive) added a comment -

          [~jerome.vieilledent@ez.no], I tried (as you suggest) to reproduce this following the description scenario on EZP-23927.
          On a master everything went OK, on a 5.4, with the patch applied and FOS/HttpCacheBundle 1.2, I can't even access the frontend nor the backend admin interface. When I try to, I get the following error on Apache logs:

          [Fri Jan 30 09:39:08.641612 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP Fatal error:  Class 'FOS\\HttpCacheBundle\\SymfonyCache\\EventDispatchingHttpCache' not found in /var/www/html/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/HttpCache.php on line 20
          [Fri Jan 30 09:39:08.641690 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP Stack trace:
          [Fri Jan 30 09:39:08.641706 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP   1. {main}() /var/www/html/ezpublish5/web/index.php:0
          [Fri Jan 30 09:39:08.641713 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP   2. require_once() /var/www/html/ezpublish5/web/index.php:64
          [Fri Jan 30 09:39:08.641720 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP   3. Composer\\Autoload\\ClassLoader->loadClass() /var/www/html/ezpublish5/web/index.php:0
          [Fri Jan 30 09:39:08.641726 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP   4. Composer\\Autoload\\includeFile() /var/www/html/ezpublish5/vendor/composer/ClassLoader.php:301
          [Fri Jan 30 09:39:08.641732 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP   5. include() /var/www/html/ezpublish5/vendor/composer/ClassLoader.php:412

          so I can't even begin to test.
          Any idea?

          Show
          Rui Silva (Inactive) added a comment - [~jerome.vieilledent@ez.no] , I tried (as you suggest) to reproduce this following the description scenario on EZP-23927 . On a master everything went OK, on a 5.4, with the patch applied and FOS/HttpCacheBundle 1.2, I can't even access the frontend nor the backend admin interface. When I try to, I get the following error on Apache logs: [Fri Jan 30 09:39:08.641612 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP Fatal error: Class 'FOS\\HttpCacheBundle\\SymfonyCache\\EventDispatchingHttpCache' not found in /var/www/html/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/HttpCache.php on line 20 [Fri Jan 30 09:39:08.641690 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP Stack trace: [Fri Jan 30 09:39:08.641706 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP 1. {main}() /var/www/html/ezpublish5/web/index.php:0 [Fri Jan 30 09:39:08.641713 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP 2. require_once() /var/www/html/ezpublish5/web/index.php:64 [Fri Jan 30 09:39:08.641720 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP 3. Composer\\Autoload\\ClassLoader->loadClass() /var/www/html/ezpublish5/web/index.php:0 [Fri Jan 30 09:39:08.641726 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP 4. Composer\\Autoload\\includeFile() /var/www/html/ezpublish5/vendor/composer/ClassLoader.php:301 [Fri Jan 30 09:39:08.641732 2015] [:error] [pid 2914] [client 192.168.2.63:50838] PHP 5. include() /var/www/html/ezpublish5/vendor/composer/ClassLoader.php:412 so I can't even begin to test. Any idea?
          Hide
          Jérôme Vieilledent (Inactive) added a comment - - edited

          Rui: You need to ensure you have FOSHttpCacheBundle 1.2 installed... If not, composer update friendsofsymfony/http-cache-bundle

          Show
          Jérôme Vieilledent (Inactive) added a comment - - edited Rui: You need to ensure you have FOSHttpCacheBundle 1.2 installed... If not, composer update friendsofsymfony/http-cache-bundle
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master and 5.4.
          On a 5.4, the command:

          php composer.phar update --no-dev --prefer-dist ezsystems/ezpublish-kernel

          for some reason wouldn't update friendsofsymfony/http-cache-bundle.
          Had to use:

          php composer.phar update

          instead from root.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master and 5.4. On a 5.4, the command: php composer.phar update --no-dev --prefer-dist ezsystems/ezpublish-kernel for some reason wouldn't update friendsofsymfony/http-cache-bundle. Had to use: php composer.phar update instead from root.

            People

            • Assignee:
              Unassigned
              Reporter:
              Jérôme Vieilledent (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: