SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
740 stars 384 forks source link

There are no changes on SmartEdit UI after adding/deleting components #11848

Closed VBAlexG closed 3 years ago

VBAlexG commented 3 years ago

Describe the bug There are no changes on SmartEdit UI after adding/deleting components. This Behavior occurs with the ootb Electronics Store and also in my Customers Project.

Tell us the version of Spartacus Spartacus: 3.1 Hybris/SAP Commerce Cloud: 2011.2

To Reproduce Steps to reproduce the behavior:

  1. Go to the SmartEdit and login as Digital manager
  2. Open any page
  3. Add or remove component on the page

Actual behavior The changes on the components are only visible after reloading the Page.

Expected behavior Changes should be shown on the page without reloading the Page.

Screenshots No Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information): Not Tested on mobile Devices.

Additional context My Team and our Customer noticed this Issue after upgrading Spartacus from 2.1 to 3.1.

J0hn-sOn commented 3 years ago

Hello,

i just experienced the same issue on the latest version with a default electronics setup. After modifying a page/component, the view is not refreshed. In the console i could see, that the preview page is not retrieved correctly:

https://localhost:9002/occ/v2/electronics-spa/cms/pages/$%7Bid%7D?code=homepage&lang=en&curr=USD&cmsTicketId=64783905004161927b757e91-5966-48e7-ab94-290b90688466

in the url path you can see, that the page ID is not filled properly. there is the placeholder $%7Bid%7D instead. When calling the right url with a browser, i get the correct result.

Hope i could help

plabadie commented 3 years ago

This SO question his also possibly related https://stackoverflow.com/questions/67090870/spartacus-page-id-not-resolved-after-changes-from-smartedit

jwdwsq commented 3 years ago

This has been open for a while. Any timelines when we can expect this bug to be fixed? Any workarounds?

Xymmer commented 3 years ago

Hi! Sorry for the delay. The refresh with SmartEdit issue can be caused by 3 different scenarios, 2 of which aren't related to Spartacus. A summary of trouble-shooting steps is here: https://sap.github.io/spartacus-docs/smartEdit-setup-instructions-for-spartacus/#troubleshooting

For the issue that is specific to Spartacus, when 3.1 was released, we inadvertently broke SmartEdit refresh, but it's fixed now. See #12100.

Other reasons for refresh problems are stated in the troubleshooting. There's a caching configuration setting and also SmartEdit itself had an issue with refresh a while back. I'm closing this ticket for now as we've tested it and it's working, but contact me if not.