adobe / commerce-cif-connector

AEM Commerce connector for Magento and GraphQL
Apache License 2.0
43 stars 27 forks source link

CIF-1715: Cancel button issue in folder properties and configuration properties #157

Closed hbacila closed 3 years ago

hbacila commented 3 years ago

Description

This fixes a navigation loop caused by an unusual flow where properties page (configuration properties) is opened from another properties page (folder properties). The Save & Cancel buttons use a backHref property which depends on the HTTP header's referer.

${empty header.Referer ? granite:concat("/aem/products.html", granite:encodeURIPath(granite:relativeParent(empty param.item ? requestPathInfo.suffix : param.item, 1))) : header.Referer}

The issue occurs when the user returns to the folder properties page from the configuration properties page because the backHref of the Save & Close buttons is set to the referer (configuration page).

The suggested fix is to overlay the commerce/gui/content/products/folderproperties with backHref set to the product console page (remove dependency on header.Referer) (. Using an overlay instead of directly changing the backHref formula in commerce module preserves original functionality for modules relying directly on /libs/commerce/gui/content/products/folderproperties.

How Has This Been Tested?

Types of changes

Checklist: