Closed MarkHorman closed 5 years ago
Hi @MarkHorman, I've been unable to replicate this on 6.4.4 with Core Components 2.1.0
(the version with which the teaser was released), nor on the latest version of the Core Components. Could you please post the correct version of the Core Components you are seeing this issue with?
Also consider updating to the latest release (2.7.0
) - there was a similar issue fixed there: https://github.com/adobe/aem-core-wcm-components/issues/719
Thanks :)
Apologies @richardhand , that should have read Core Components version = 2.5.0. Updated Ticket, however in the mean time I'll have a look at 2.7.0 to see if I can replicate the issue
@richardhand Issue repeatable on core Teaser 2.7.0
teaser.mov.zip attached a video to illustrate the issue. As it turns out as soon as I modify the CTA label, the title is being reset to it's previous value.
Step 1: modify Teaser Title Step 2: click Actions Tab and change the CTA label Step3: click back Text Tab....notice the Title has reverted to previous unedited value.
@MarkHorman, I was also able to reproduce the problem with 6.4.4.0 and 2.7.0 but it seems that it didn't use the last implementation of the checkboxTextfieldTuple.js which solved the issue. After deleting my browser cache I was not able to reproduce the problem anymore. Could you please try it again after deleting your cache and let me know if it works ok also for you?
@andreeadracea problem persists after clearing the cache.
looks to me that retrievePageInfo method in clientlibs/editor/js/teaser.ts is retrieving the Title here titleTuple.seedTextValue(data["jcr:title"]); but as I haven't yet saved the changes to title before changing tabs it's reverting to the previously stored value.
@MarkHorman, the commit which solve the problem is https://github.com/adobe/aem-core-wcm-components/commit/d8e4c986b8fe384a4b2bc6734c8549d337797708 and the solution was released on 2.7.0.
Could you please check if this code was added to your instance to this js file (/apps/core/wcm/components/commons/v1/clientlibs/editor/checkboxTextfieldTuple/checkboxTextfieldTuple.js)?
self._textfield.addEventListener("change", function() { self._textfield.setAttribute(self.ATTR_PREVIOUS_VALUE, self._getTextfieldValue()); });
Also, could you please check also on your browser if this js file was updated?
@andreeadracea confirm that code exists at line 77 on my instance and also confirm that the file in browser cache has the same. However, I'm not following why you think the checkboxTextfieldTuple is related? I haven't touched any checkbox since creating the initial teaser content when I enabled the CTA. This is only about editing Text.Title, and CTA.Title at the same time, the Text.Title is being reverted after edit of the CTA.Title. BTW I added a breakpoint at the code you mentioned above, it is never hit during the actions mentioned below.
Issue persists:
Hi @MarkHorman, I've retested with the scenario you described with Core Components 2.7.0 and everything worked ok for me. With Core Comp. 2.5.0 I could reproduce your issue.
I've attached a screen recording with the steps I did in order to reproduce your scenario.
@andreeadracea I created a new AEM instance and retested this. Agree core 2.7 resolves this issue. Seems my existing instance had become corrupted somehow and the install of 2.7 had failed to update correctly. Closing this issue
Bug Report
Current Behavior I am overlaying the Core Teaser component with resourceSuperType=core/wcm/components/teaser/v1/teaser.
Add details for the Teaser and save. Go back in to edit the Teaser and modify the Title, navigate to the actions Tab and edit the CTA label, Save/close the dialog. Notice that the change to the Title was not saved and updated, but only the CTA label.
Expected behavior/code I would expect any/all changes made inside the Teaser Dialog to be saved regardless of how many changes are made on each tab.
Environment