Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-5474

GUEST_CHECKOUT_AUTHENTICATION systematic redirect

    Details

      Description

      The GUEST_CHECKOUT_AUTHENTICATION template triggers an automatic redirection even if you are not signed in.

      I don't understand why because it's only supposed to happen if themeDisplay.isSignedIn.

      However, we found thanks to Louis-Guillaume Durand that it works fine if you replace the server side signed in check with a javascript condition like this:

      https://gist.github.com/fabian-bouche-liferay/ae634bab4c1e240cd86363ce554b0696

       

      Steps to reproduce:

       

      Setup:

      1/ Create a site, call it "My channel site"

      2/ Create a warehouse, call it "My Warehouse"

      3/ Create a new catalog, call it "My Catalog"

      4/ Create a new product in that catalog, call it "My Product"

      5/ Add 10 items to the default SKU of "My Product"

      6/ Create a new channel, call it "My channel", associate it to site "My channel site", enable guest checkout

      7/ On the channel settings, create all the missing pages using the "Fix" buttons

      8/ Go to "My channel site", create a "home" page and put a commerce product publisher widget

      9/ In the product publisher widget settings, select the minium product renderer (the default one does not work)

       

      Execution:

      1/ Open a private browsing tab and aim at http://localhost:8080/web/my-channel-site/home

      2/ Select my product and add it to the cart

      3/ Now hit http://localhost:8080/web/my-channel-site/authentication

       

      Expected result: the "authentication" page is displayed

      Actual result: the "authentication" page quickly displays but we get an immediate redirection to the full screen login portlet: http://localhost:8080/web/my-channel-site/home?p_p_state=maximized&p_p_mode=view&refererPlid=16&saveLastPath=false&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=/login/login&p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&_com_liferay_login_web_portlet_LoginPortlet_redirect=/web/my-channel-site/checkout?p_p_id=com_liferay_commerce_checkout_web_internal_portlet_CommerceCheckoutPortlet&p_p_lifecycle=0

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lorenzo.lapescara Lorenzo La Pescara
              Reporter:
              fabian.bouche Fabian Bouché
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.4 CE GA1
                  Master