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

Legacy session events not triggered any more

    Details

    • Sprint:
      Pollux Core S5

      Description

      As of 5.3, authentication is completely managed through Symfony. One side effect is that legacy session events are not triggered any more (either via ezpEvent or eZSession::triggerCallback()), and thus listeners won't be executed. This is because it is now entirely up to Symfony to deal with the session, including session migration after authentication.

      Concrete illustration of this regression : When using the shop module existing in legacy the items in the shopping basket is lost after logging in. In short, when the session is migrated after the user has been authenticated, the basket table, storing each entry per session ID, won't be updated at that time, resulting the loss of the basket for current user.


      Steps to reproduce:

      Start from a clean 5.3 installation with eZ Demo

      1. Activate the shop module in the backend adding Tabs[]=shop to the [TopAdminMenu] settings group in menu.ini
      2. Grant the anonymous user to shop by adding the following policy to the Anonymous role: shop / buy / No limitations
      3. Clear all caches
      4. Access the demo design frontent as anonymous user
      5. Click buy on any featured products
      6. Check the basket in http://your.site/shop/basket and notice the item you just added
      7. Log in with any user you have in your site
      8. Check the basket again in http://your.site/shop/basket and notice that the items in the basket disappeared

        Issue Links

          Activity

          Hide
          Paulo Bras (Inactive) added a comment - - edited

          Hi Jérome,

          it appears something is not passed to the /shop legacy module, here:
          /vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishLegacyBundle/LegacyMapper/Session.php

          i don't know the shop, so was roaming around trying to figure it out. but since you got this, maybe this helps to save time.

          Show
          Paulo Bras (Inactive) added a comment - - edited Hi Jérome, it appears something is not passed to the /shop legacy module, here: /vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishLegacyBundle/LegacyMapper/Session.php i don't know the shop, so was roaming around trying to figure it out. but since you got this, maybe this helps to save time.
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Hi

          Thanks Paulo, I'll check this out.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Hi Thanks Paulo, I'll check this out.
          Show
          Jérôme Vieilledent (Inactive) added a comment - PR on LegacyBridge: https://github.com/ezsystems/LegacyBridge/pull/6
          Show
          Jérôme Vieilledent (Inactive) added a comment - - edited Fixed in LegacyBridge master: https://github.com/ezsystems/LegacyBridge/commit/1ede1c08175d775c61eae57e777ab5558d4c6112 https://github.com/ezsystems/LegacyBridge/commit/8b7b055383e316bd61977443d91805037122a9f9
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA.
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Additional commit to ensure legacy form token check is disabled when migrating the session : https://github.com/ezsystems/LegacyBridge/commit/f59ecfcfbc1ce9126835247d1d41ee029406c7f4

          Show
          Jérôme Vieilledent (Inactive) added a comment - Additional commit to ensure legacy form token check is disabled when migrating the session : https://github.com/ezsystems/LegacyBridge/commit/f59ecfcfbc1ce9126835247d1d41ee029406c7f4

            People

            • Assignee:
              Unassigned
              Reporter:
              Ricardo Correia (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile