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

Template Bulder: Need to disable the auto publish when the template is archived #25937

Closed
bryanboza opened this issue Aug 29, 2023 · 3 comments · Fixed by #25942
Closed

Template Bulder: Need to disable the auto publish when the template is archived #25937

bryanboza opened this issue Aug 29, 2023 · 3 comments · Fixed by #25942

Comments

@bryanboza
Copy link
Member

bryanboza commented Aug 29, 2023

Problem Statement

As part of the new requirements, we are firing the auto-publish job 5 seconds after you do some changes, but this is causing an error when the template is in the archived state, this b/c the publish is not an available workflow action.

Then we are getting an error on the log and also printing an error at the UI level.

Screen.Recording.2023-08-29.at.1.19.11.PM.mov

Here is the noisy log:
https://gist.github.com/bryanboza/f34d0498bdefe465cb3fd778835c73b8

Additionally, if you continue doing changes here, we get a JS error and then we are unable to navigate to any other portlet or go out of it.

Steps to Reproduce

##Case 1

  • Login as admin
  • Navigate to templates portlet
  • Archive some existing template
  • Try to edit it, and wait for the auto-publish job

##Case 2

  • After finishing the case1 continue doing some changes in the template
  • Wait 5 seconds and try to navigate to another portlet

Acceptance Criteria

  • If the template is archived we need to disable the auto-publish
  • We need to catch the exception and print just a line error in the log
  • We need to be able to continue navigating after the error need

dotCMS Version

Tested on master

Proposed Objective

Quality Assurance

Proposed Priority

Priority 1 - Show Stopper

@zJaaal zJaaal self-assigned this Aug 29, 2023
fmontes pushed a commit that referenced this issue Aug 30, 2023
…5942)

* fix (template save and publish): enhancing error and request handling

* feedback (dot templates service): delete old save and publish

* fix (gridstack utils): EMPTY_ROWS_VALUE was being modified by reference
@rjvelazco rjvelazco self-assigned this Aug 30, 2023
@rjvelazco
Copy link
Contributor

Passed Internal QA

We decided to keep the notification instead of disabling the auto-publish in this Slack Conversation

Tested on master

Screen.Recording.2023-08-30.at.2.43.40.PM.mov

@fmontes
Copy link
Member

fmontes commented Aug 31, 2023

We are not disabling autosave... the message that is not saving is ok, but we are making sure that the app don't crash.

fmontes pushed a commit that referenced this issue Aug 31, 2023
…5942)

* fix (template save and publish): enhancing error and request handling

* feedback (dot templates service): delete old save and publish

* fix (gridstack utils): EMPTY_ROWS_VALUE was being modified by reference
fmontes added a commit that referenced this issue Aug 31, 2023
* Fix #25917: Template Builder file containers were saving with Identifier instead of Path (#25920)

* dev (gridstack utils): add getContainerReference

* dev (template builder store): implement getContainerReference

* fix (palette content type module): add DotMessagePipe import

* feedback (template builder): moved getContainerReference from utils to box component

* feedback (template builder box test): enhance testing

* fix (containers mock): fix merge errors

* Fix #25937: Template Builder Enhancing error and request handling (#25942)

* fix (template save and publish): enhancing error and request handling

* feedback (dot templates service): delete old save and publish

* fix (gridstack utils): EMPTY_ROWS_VALUE was being modified by reference

* Fix #25926: Template Builder fixing wrong classes deletion (#25928)

* dev (add style classes module): refactor to support remove any class

* fix (template builder story): console error due to missing import

* Fix #25926 Reimplement the autocomplete component (#25935)

* Reimplement the autocomplete component

* dev (add styles autocomplete): enhance functionality

* Fix filtering and styling.

* Fix the filtering and language messages

* Add tests for JsonClassesService

* Test are not running

* fix (add styles dialog): now tests are running

* Fix tests

* Update mocks

---------

Co-authored-by: Jalinson Diaz <[email protected]>

* Fix #25926 Templater Builder: Fixing link target

* Fixing test (#25911)

---------

Co-authored-by: Jalinson Diaz <[email protected]>
Co-authored-by: Rafael Velazco <[email protected]>
Co-authored-by: Manuel Rojas <[email protected]>
@bryanboza
Copy link
Member Author

Fixed, now it is working better and it is not breaking the portlet. We can close this card for now, some improvements moved to a new card #25981

@bryanboza bryanboza added QA : Approved Release : 23.09.6 Release Template Builder labels Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants