1
votes

When configuring Hybris smartedit to use compiled Spartacus in static web server (Azure Storage Account in my case), smartedit gets URL references to /cx-preview?cmsTicketId=.... This results in HTTP 404, as there is no such file available.

I have compiled Spartacus by running

ng build

Currently, my workaround is to have a dedicated virtual machine running

ng serve

And having all the needed dependencies installed. But this is suitable only for development usage.

I have followed instructions in https://sap.github.io/cloud-commerce-spartacus-storefront-docs/smartEdit-setup-instructions-for-spartacus/#page-title, apart for the last step, as Azure Storage Account can only hold static content.

Spartacus UI works fine from Azure Storage Account

1

1 Answers

2
votes

It does look like your Site table hasn't been updated to reflect the location to your storefront: "/cx-preview" clearly shows a default URL from when smartedit and stortefront are in same origin within the SAP Hybris commerce platform. So make sure to update the previewUrl field of the Site table for your given site.

Here: https://sap.github.io/cloud-commerce-spartacus-storefront-docs/smartEdit-setup-instructions-for-spartacus/#configuring-smartedit-to-work-with-a-spartacus-storefront you will find, amongst other things:

. Ensure that the WCMS Cockpit Preview URL is set correctly. . In Backoffice, in WCMS > Website > your site, click the WCMS Properties tab. . Set the WCMS Cockpit Preview URL to your Spartacus web site. For this example, it . should point to https://localhost:4200

Hope this helps.