core icon indicating copy to clipboard operation
core copied to clipboard

Multiple issues with Templates

Open joseorsini opened this issue 9 years ago • 5 comments

Currently, we do not allow the following tasks related to Templates:

  • Full Delete. We cannot delete templates from system. Nothing is logged in the dotcms.log file, and Template remains as an archived asset. It seems like the action in the UI doesn't trigger the struts action for a full delete, as detailed on the EditTemplateAction class.
  • Even if we're able to delete Templates, we should prevent this from happening in case the Template is being used by Pages (in the same way we do it for Content Types being used on Containers).
  • Make sure that both delete processes (from Delete Button at the bottom of the list, and via right-click) behave the same, meaning that they should display the same dialog and the list of htmlpages that use the template (if any)

Context

Reported by customer: https://dotcms.zendesk.com/agent/tickets/94771

Your Environment

  • dotCMS version used: 4.2.2.
  • Browser Name and version: any Browser.
  • Operating System and version: Any OS.
  • Application Server and version: Any App server.
  • Java Brand and version: Any supported Java 8 version.
  • Database and version: any DB.
  • Application module (if apply): N/A.

joseorsini avatar Nov 21 '17 16:11 joseorsini

A lucene query can be done to get the list of dependencies (if any)

dsilvam avatar Nov 21 '17 19:11 dsilvam

Note to QA: Try to delete a template that is used by a lot of htmlpages (should not let delete it) and see if the Dialog with the list of dependencies makes sense and displays good, and the message is clear to the user.

dsilvam avatar Nov 30 '17 17:11 dsilvam

Passed QA.

Verified that: Templates with no page/container dependencies can be deleted Templates with page dependencies cannot be deleted Update on template name is reflected on its dependencies (i.e.: pages) Template is deleted thru UI by right click image

Template is deleted thru UI by clicking the 3 ellipsis image

Template is deleted in DB Confirmation message is consistent with the different ways the system has to delete it

Tested with upgrade from dotcms_3.x with client dataset to master branch Ubuntu 14.04.1 / Postgres 9.3.7 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8

shaydotcms avatar Dec 01 '17 23:12 shaydotcms

Page title is not enough info. We need to show: host + path

dsilvam avatar Dec 04 '17 15:12 dsilvam

Passed QA. Now popup is showing host + path

image

Tested with upgrade from dotcms_3.x to master branch Ubuntu 14.04.1 / Postgres 9.3.7 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8

shaydotcms avatar Jan 11 '18 17:01 shaydotcms