Unable to delete Editable Template on Dispatcher rendered AEM 6.5 instance with Service Pack 7

Avatar

Avatar
Boost 1
Level 1
hinajain29
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Boost 1
Give Back
Ignite 1
View profile

Avatar
Boost 1
Level 1
hinajain29
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Boost 1
Give Back
Ignite 1
View profile
hinajain29
Level 1

22-01-2021

Hi all,

 

We are not able to delete editable template on dispatcher rendered AEM 6.5 instance with service pack 7 installed.

 

Error while deleting  newly created template which is not referenced in any page:

 

Steps followed:

1. Login to dispatcher server http://local.author.abc.com/libs/wcm/core/content/sites/templates.html/conf/we-retail

2. Create a new template say TestTemplate

3. Delete this TestTemplate in draft/enable mode

 

we see below error:

Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)

 

hinajain29_1-1611344078557.png

 

Error is thrown due to JSON.parse() method in templatedelete.is. data is passed as Object instead of String

 

 /libs/cq/gui/components/siteadmin/admin/templates/clientlibs/js/templatedelete.js

 

function handleDeleteRequest(paths) {
return $.ajax({
url: "/libs/wcm/core/content/sites/templates/usage.json",
type: "GET",
data: {
_charset_: "UTF-8",
path: paths
},
success: function(data) {
ui.clearWait();

// usages found
if (data && JSON.parse(data).anyTemplateUsed) {

 

We can delete editable templates from path http://localhost:4502/libs/wcm/core/content/sites/templates.html/conf/we-retail

 

Are there any configuration in dispatcher.any that we have to allow in order to delete Editable Templates.

 

Any help will be appreciated.

 

Thanks

Hina

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct reply

173 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct reply

173 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile
kunal23
MVP

24-01-2021

Have you configured the dispatcher rules appropriately to not to cache anything under /apps and /libs?  It could be possible the usage.json mentioned in your screenshot is getting cached. If it is getting cached then make sure have disallowed /libs and /apps from the cache in your author dispatcher configuration. 

 

Answers (1)

Answers (1)

Avatar

Avatar
Level 1
hpulijala
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
hpulijala
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
hpulijala
Level 1

24-02-2021

We are also getting the same error after our upgrade. We checked dispatcher but this usage.json is not at all being cached. Any other suggestions to fix this issue?