Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Editable Templates not displayed

Avatar

Level 2

We are not able to navigate via Templates tab under Tools-->General-->Templates (nothing is displayed)
AEM version: AEM 6.4.6.0
This blocks us the ability to create editable templates under the /conf folder

Please note we can see the folders created under /conf folder

1 Accepted Solution

Avatar

Correct answer by
Level 2

Recreated the instance which solved the issue as it was likely caused by a corrupted repository.

View solution in original post

11 Replies

Avatar

Community Advisor

If possible can u share with us the package of conf/project folder we can have a look

Avatar

Level 2

I can.

I am unable to upload it here as an attachment.

Should  I upload elsewhere?

Avatar

Employee

Can you check if "editable templates" is selected for the projects under Tools--> General--> Configuration Browser?

 

http://<host:port>/libs/granite/configurations/content/view.html/conf

 

Capture.JPG

Avatar

Employee

The following permissions are required for creating editable templates:

 

Capture.JPG

 

Can you confirm if you have all the required permissions as depicted in above screenshot? Best would be to check with "admin" user.

Avatar

Level 2
Yes I checked with admin and it is the same issue.I don't think it is with permissions based on my checks so far.

Avatar

Employee

This issue isn't reproducible OOTB.

 

* Do you see any Console errors in Developer Tools of your browser?

* Do you see the same issue using OOTB admin user?

 

If it's not related to permissions, try the following steps as well:

* Enable DEBUG log level on query class below in /system/console/slinglog

org.apache.jackrabbit.oak.query

 

* Reload the http://<host>/<port>/libs/wcm/core/content/sites/templates.html/conf on your AEM environment.

* You will see the logs showing some query. It would be something like: 

SELECT * FROM [cq:Page] AS p WHERE ISDESCENDANTNODE([/conf]) AND p.[jcr:path] LIKE '/conf/%/settings/wcm/templates' ORDER BY [jcr:path]

 

* Run that query in Explain Query tool (/libs/granite/operations/content/diagnosistools/queryPerformance.html) with Include Execution Time and Include Node Count checkboxes checked.

 

Does it show any results?

* If it does, then the query is showing the correct results. Something on the UI side could be causing the issue.

Recompile JSPs & rebuild clientlibs, and then verify whether you see the templates appearing. 

https://helpx.adobe.com/experience-manager/kb/How-to-force-a-recompilation-of-all-Sling-scripts-jsps...

* If it doesn't, it could be something to do with cqPageLucene(/oak:index/cqPageLucene). Try re-indexing it and verify whether the issue still exists. Try using OOTB cqPageLucene index and then verify whether the issue still exists.

 

 

Hope it helps !!

Avatar

Level 2

Thanks sunjot.Rebuilding the clientlibs did not help and no errors in the console. Adding the log here for the explain query:

 

{
    "statement": "SELECT * FROM [cq:Page] AS p WHERE ISDESCENDANTNODE([/conf]) AND p.[jcr:path] LIKE '/conf/%/settings/wcm/templates' ORDER BY [jcr:path]",
    "language": "JCR-SQL2",
    "explain": {
        "logs": [
            "Parsing JCR-SQL2 statement: explain SELECT * FROM [cq:Page] AS p WHERE ISDESCENDANTNODE([/conf]) AND p.[jcr:path] LIKE '/conf/%/settings/wcm/templates' ORDER BY [jcr:path]\n",
            "Execute JCR-SQL2 / explain SELECT * FROM [cq:Page] AS p WHERE ISDESCENDANTNODE([/conf]) AND p.[jcr:path] LIKE '/conf/%/settings/wcm/templates' ORDER BY [jcr:path]\n",
            "Literal used\n",
            "Attempting optimisation\n",
            "cost using filter Filter(query=explain SELECT * FROM [cq:Page] AS p WHERE ISDESCENDANTNODE([/conf]) AND p.[jcr:path] LIKE '/conf/%/settings/wcm/templates' ORDER BY [jcr:path], path=/conf//*)\n",
            "cost for reference is Infinity\n",
            "cost for property is Infinity\n",
            "cost for nodeType is Infinity\n",
            "Ignoring index [/oak:index/slingeventJob] which is not working correctly since 16.66 d ,0 indexing cycles, accessed 32900 times\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/versionStoreIndex\n",
            "Applicable IndexingRule found IndexRule: nt:base\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/cqTagLucene\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/workflowDataLucene\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/socialLucene\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/authorizables\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/ntBaseLucene\n",
            "Applicable IndexingRule found IndexRule: nt:base\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/nodetypeLucene\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/lucene\n",
            "Applicable IndexingRule found IndexRule: nt:base\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/commerceLucene\n",
            "Applicable IndexingRule found IndexRule: nt:base\n",
            "Opting out due mismatch between path restriction /conf and query paths [/var/commerce]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/enablementResourceName\n",
            "Applicable IndexingRule found IndexRule: nt:base\n",
            "Opting out due mismatch between path restriction /conf and query paths [/content]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/cqReportsLucene\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/repTokenIndex\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/cqProjectLucene\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/cmLucene\n",
            "No applicable IndexingRule found for any of the superTypes [nt:hierarchyNode, cq:Page, nt:base, mix:created]\n",
            "Ignoring index [/oak:index/damAssetLucene] which is not working correctly since 16.66 d ,0 indexing cycles, accessed 27445 times\n",
            "Evaluating plan with index definition Lucene Index : /oak:index/cqPageLucene\n",
            "Applicable IndexingRule found IndexRule: cq:Page\n",
            "cost for [/oak:index/cqPageLucene] of type (lucene-property) with plan [lucene:cqPageLucene(/oak:index/cqPageLucene) :ancestors:/conf] is 1601.00\n",
            "cost for lucene-property[/oak:index/cqPageLucene] is 1601.0\n",
            "cost for aggregate lucene is Infinity\n",
            "looking for plans for paths : []\n",
            "cost for aggregate solr is Infinity\n",
            "cost for traverse is 2000.0\n",
            "No alternatives found. Query: select [p].[jcr:primaryType] as [p.jcr:primaryType], [p].[jcr:createdBy] as [p.jcr:createdBy], [p].[jcr:created] as [p.jcr:created] from [cq:Page] as [p] where (isdescendantnode([p], [/conf])) and ([p].[jcr:path] like '/conf/%/settings/wcm/templates') order by [p].[jcr:path] ASCENDING\n",
            "query:\texplain SELECT * FROM [cq:Page] AS p WHERE ISDESCENDANTNODE([/conf]) AND p.[jcr:path] LIKE '/conf/%/settings/wcm/templates' ORDER BY [jcr:path]\n",
            "count:\t1\tquery:\texplain SELECT * FROM [cq:Page] AS p WHERE ISDESCENDANTNODE('x') AND p.[jcr:path] LIKE 'x' ORDER BY [jcr:path]\n"
        ],
        "plan": "[cq:Page] as [p] /* lucene:cqPageLucene(/oak:index/cqPageLucene) :ancestors:/conf where (isdescendantnode([p], [/conf])) and ([p].[jcr:path] like '/conf/%/settings/wcm/templates') */",
        "propertyIndexes": [
            "cqPageLucene(/oak:index/cqPageLucene)"
        ]
    },
    "heuristics": {
        "count": 0,
        "countTime": 2,
        "executionTime": 4,
        "getNodesTime": 1,
        "totalTime": 7
    }
}

Avatar

Employee
@kartheekd203042 The count seems to be 0. It could be something to do with cqPageLucene(/oak:index/cqPageLucene). Try re-indexing it and verify whether the issue still exists. Try using OOTB cqPageLucene index and then verify whether the issue still exists.

Avatar

Level 2
The issue is resolved by recreating the instance as it seems to be caused due to a corrupted repository.Thanks all for your help on this.

Avatar

Correct answer by
Level 2

Recreated the instance which solved the issue as it was likely caused by a corrupted repository.