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

Scheduled publishing doesn't work together with Redis cache

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 1.13.2
    • 1.13.0
    • None
    • [2.2] Sprint 2

    Description

      Issue title kinda explains the problem.

      Step to reproduce
      browser tab 1:
      go to http://localhost:8080/Places-Tastes/Places

      browser tab 2:
      log in to backend and schedule new Place to be located below Places-Tastes/Places

      console:

      1. enter app container
        docker exec -ti --user www-data tastefulplanet_app_1 /bin/bash
      2. run scheduler:
        php app/console ezpublish:cron:run --env=prod

      Browser tab 1:
      Refresh page (Places-Tastes/Places)
      Failure : new content will not be displayed

      ezplatform log:

      2018-02-06 14:45:28] app.NOTICE: Siteaccess not matched against configuration, returning default siteaccess. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was not able to match, message "" [] []
      [2018-02-06 14:45:28] app.INFO: UrlAlias matched location #71. Forwarding to ViewController [] []
      [2018-02-06 14:45:28] request.INFO: Matched route "ez_urlalias". {"route_parameters":{"_route":"ez_urlalias","_controller":"ez_content:viewAction","contentId":70,"locationId":"71","viewType":"full","layout":true},"request_uri":"http://localhost:8080/Places-Tastes/Places"} []
      [2018-02-06 14:45:28] security.DEBUG: Read existing security token from the session. {"key":"_security_ezpublish_front"} []
      [2018-02-06 14:45:28] security.DEBUG: User was reloaded from a user provider. {"username":"admin","provider":"eZ\\Publish\\Core\\MVC\\Symfony\\Security\\User\\Provider"} []
      [2018-02-06 14:45:28] app.DEBUG: 'social_network_image' variation on places-tastes/places/475-2-eng-GB/Paris_sunset.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'social_network_image' variation on places-tastes/places/475-2-eng-GB/Paris_sunset.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'latest_article' variation on places-tastes/tastes/ethiopian-cuisine/315-4-eng-GB/Ethiopian-Cuisine.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'header' variation on places-tastes/places/475-2-eng-GB/Paris_sunset.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'place' variation on places-tastes/places/valencia-spain/276-4-eng-GB/Valencia-Spain.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'place' variation on places-tastes/places/kochin-india/282-5-eng-GB/Kochin-India.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'place' variation on places-tastes/places/santo-domingo-dominican-republic/288-4-eng-GB/Santo-Domingo-Dominican-Republic.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'place' variation on places-tastes/places/anchorage-alaska/294-4-eng-GB/Anchorage-Alaska.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'place' variation on places-tastes/places/brooklyn-new-york/300-4-eng-GB/Brooklyn-New-York.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] app.DEBUG: 'place' variation on places-tastes/places/amsterdam-netherlands/306-6-eng-GB/Amsterdam-Netherlands.jpg is already generated. Loading from cache. [] []
      [2018-02-06 14:45:28] app.DEBUG: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_urlalias' not found': Unable to generate a URL for the named route "ez_urlalias" as such route does not exist. [] []
      [2018-02-06 14:45:28] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("When generating an UrlAlias route, either 'location', 'locationId' or 'contentId' must be provided.")." at /var/www/vendor/ezsystems/ezstudio-demo-bundle/Resources/views/line/place.html.twig line 3 {"exception":"[object] (Twig_Error_Runtime(code: 0): An exception has been thrown during the rendering of a template (\"When generating an UrlAlias route, either 'location', 'locationId' or 'contentId' must be provided.\"). at /var/www/vendor/ezsystems/ezstudio-demo-bundle/Resources/views/line/place.html.twig:3, InvalidArgumentException(code: 0): When generating an UrlAlias route, either 'location', 'locationId' or 'contentId' must be provided. at /var/www/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/Routing/UrlAliasRouter.php:355)"} []
      [2018-02-06 14:45:28] security.DEBUG: Stored the security token in the session. {"key":"_security_ezpublish_front"} []
      [2018-02-06 14:45:28] security.DEBUG: Read existing security token from the session. {"key":"_security_ezpublish_front"} []
      [2018-02-06 14:45:28] security.DEBUG: User was reloaded from a user provider. {"username":"admin","provider":"eZ\\Publish\\Core\\MVC\\Symfony\\Security\\User\\Provider"} []
      [2018-02-06 14:45:28] security.DEBUG: Stored the security token in the session. {"key":"_security_ezpublish_front"} []
      

      Browser tab 2:
      Refresh page in backend (Places-Tastes/Places)
      Failure : Children list will fail to load ("An error occurred while loading the sub-items list. ")
      You'l get a 404 on POST http://localhost:8080/api/ezp/v2/views

      "Fix " browser tab 2:

      1. clear redis cache:
        docker exec -ti tastefulplanet_redis_1 /bin/bash
        redis-cli
        > FLUSHALL
        Refresh page in backend (Places-Tastes/Places)

      "Fix" browser tab 1:

      1. clear cache in app container:
        php app/console c:c --env=prod
        ( you'll need to clear cache in redis prior to running that command, or it won't help. This also indicates that clear:cache doesn't clear cache in redis)
        Refresh page (Places-Tastes/Places), "success!!"

      Attachments

        Activity

          People

            Unassigned Unassigned
            vidar.langseid@ibexa.co Vidar Langseid
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: