Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to bring back old versions of templates #23366

Closed
bryanboza opened this issue Nov 15, 2022 · 6 comments · Fixed by #28073
Closed

Unable to bring back old versions of templates #23366

bryanboza opened this issue Nov 15, 2022 · 6 comments · Fixed by #28073

Comments

@bryanboza
Copy link
Member

bryanboza commented Nov 15, 2022

When you are working with some template and go to the history tab and try to bring back to an old version of this, we are getting an exception and we are unable to bring back

image

Stack: https://gist.github.com/bryanboza/93181818e54ed66aef0533030bd2fd83

To Reproduce

  • Create a new template
  • Edit the template and create a new version
  • Go to the history tab and try to bring back the previous version

Expected behavior

The previous version should be rendered.

Desktop (please complete the following information):

Tested on release-22.11 // Docker // FF

Helpful Information

This endpoint is returning 2 entries: System Template and the actual template we want to bring back.
https://demo.dotcms.com/api/v1/templates/?filter=d4d638fe-2ca6-4e6e-a4aa-013d6e2b97fa

Let's use the entry[1] instead of entry[0].

@erickgonzalez
Copy link
Contributor

Not reproducible in 22.03 but in demo (23.01) yes

@AndreyDotcms
Copy link
Contributor

To reproduce this issue take in count the next video:

Screen.Recording.2023-06-01.at.10.31.28.AM.mov

This could be a FE issue, feel free to reach me in case to have some doubts.

@dsolistorres dsolistorres self-assigned this Mar 12, 2024
@dsolistorres dsolistorres linked a pull request Mar 26, 2024 that will close this issue
1 task
github-merge-queue bot pushed a commit that referenced this issue Mar 27, 2024
* fix(templates): retrieve previous version of template (#23366)

* #23366 : fix format for template resolver component

---------

Co-authored-by: erickgonzalez <erick.gonzalez@dotcms.com>
@erickgonzalez erickgonzalez reopened this Mar 28, 2024
@erickgonzalez
Copy link
Contributor

On-Hold: Waiting for UI/UX to check if we should add a button in the template editing to bring back an old template.

@erickgonzalez
Copy link
Contributor

UI/UX will be done in another ticket #28417

@erickgonzalez
Copy link
Contributor

Works as intented! Now it renders the previous version.

@bryanboza
Copy link
Member Author

Ok after this fix, now we are able to render the previous version, but we still unable to bring back to this version, New card related to it here #28417

@erickgonzalez erickgonzalez added the LTS : Next Ticket that will be added to LTS label May 7, 2024
@erickgonzalez erickgonzalez removed the LTS : Next Ticket that will be added to LTS label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants