3

Can anyone answer the behavior of Update Preview in following scenarios:

  1. Clicking on Update Preview button after inserting a Component - What should Update Preview do when a new Component is inserted, and not publishing the Page by clicking on Finish Editing? Should the content from CM be displayed (showing new Component too) or only Broker (without showing the new Component?

  2. Inline editing - When user edits a Component's content and clicks on Update Preview without clicking on Finish Editing. What should be shown? Updated content from CM or previous content from Broker?

2
  1. When you click on update preview, your browser will request a Preview-Session-ID from the the Content Manager. The system will check in the SessionDB database if a newer content version than currently published exists. If a newer content exists, it will be displayed.

  2. Same behavior than 1 because as soon as you edit a Component, all changes will be written into the SessionDB immediately. When you click on Update Preview, the new Content will be displayed.

  • Might be useful to add that Update Preview is there to render the page again showing you information from your session, in case the view isn't updated accordingly. By default after adding a new Component, or when editing a Component, you will already see your changes, pressing the Update Preview button shouldn't be necessary. But if inserting a new Component places the item in a wierd place, because your Page Template might do a specific ordering in a region for example, you might want to Update the Preview, to have the Template code executed again. – Bart Koopman May 31 '17 at 8:25
  • For #2, just editing a Component doesn't necessarily create a newer version. In the CME the user must save the Component to create a minor version. In XPM, I believe Component changes are at least detected when changing the selection (click outside the Component Presentation). – Alvin Reyes May 31 '17 at 16:11
  • And I'm pretty sure adding a Component or changing a Component Template count as a page change, which should start a save and publish action followed by an automatic refresh (and prompt to the user to refresh if they don't want to wait). In that case it's probably best to wait for the reload rather than try updating the preview. – Alvin Reyes May 31 '17 at 16:13
  • I see only Items table from SessionDB getting updated when "Finish Editing" is clicked and the Page entry vanishes after sometime. I don't see any other table getting updated when the Page is in edit mode or when editing a Component inline. Also, when adding a Component doesn't show the new Component on the Page. Clicking on Update Preview button also doesn't show the new Component added (If I open the Page in CME, new Component Presentation is found). Once I click on "Finish Editing", the changes are published and I am able to see the new Component. Am I missing any configurations? – GVK May 31 '17 at 19:29
  • The Session DB should get updated when you press the "Update Preview" Button. At that time, XPM will send a GetPreviewToken request to CM, which will render the updated Page and/or DCPs and then sends this "session preview" to CD using the Preview Service. CD stores the session preview in the Session DB and returns the Session ID. Finally, XPM re-requests the Page, but with the Session ID in a preview-session-token cookie. – Rick Pannekoek Jun 6 '17 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.