"page has no template assigned" error

Avatar

Avatar
Validate 1
Level 2
carolynr5682886
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
carolynr5682886
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
carolynr5682886
Level 2

12-02-2019

Hi -

I've created a new editable page template and a page to use it. However, when I go to my publish instance to render the page I am always getting this error :

12.02.2019 15:00:51.035 *ERROR* [10.223.43.6 [1550012451027] GET /publish/content/xxxx/en/test-2/flex-homepage-test.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException

java.lang.IllegalArgumentException: page has no template assigned

at com.day.cq.wcm.foundation.TemplatedContainer.<init>(TemplatedContainer.java:66)

at com.day.cq.wcm.foundation.impl.templated.TemplatedContainerAdapterFactory.getAdapter(TemplatedContainerAdapterFactory.java:77)

but only when I am not authenticated on the publish instance. When I am authenticated on the publish instance I am able to see my page render.

All of my other pages are using static templates and are visible on the publish instance without being authenticated on the publish instance. What am I missing/doing wrong on this editable template and page to cause it to give me this error?

Thanks in advance for your help.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile
Gaurav-Behl
MVP

12-02-2019

Since you are using both static/dynamic templates together, my thought is that some configuration is missing in this setup.

check the following:

  • 'cq:conf' property is defined on root page with proper value like  /conf/<root> to link editable template structure
  • 'cq:allowedTemplates' is defined on root page with proper value like /conf/<root>/settings/wcm/templates/.*
  • your editable template has proper conventions to pick up clientlibs/designs as it should be in editable template vs static template
  • refer to /content/we-retail editable templates and compare it against your template, content page, conf folder configurations and try to find more clues

Answers (2)

Answers (2)

Avatar

Avatar
Shape 1
Employee
mahajanyogesh
Employee

Likes

6 likes

Total Posts

6 posts

Correct reply

1 solution
Top badges earned
Shape 1
Give Back
Boost 5
Boost 3
Boost 1
View profile

Avatar
Shape 1
Employee
mahajanyogesh
Employee

Likes

6 likes

Total Posts

6 posts

Correct reply

1 solution
Top badges earned
Shape 1
Give Back
Boost 5
Boost 3
Boost 1
View profile
mahajanyogesh
Employee

28-10-2020

This issue can also occur if you don't have right permission under /conf/<root>/settings/wcm/templates/rep:policy. If, for some reason, e.g. putting package from other instance without right AC handling or deletion of rep:policy in repository etc., the rep:policy node is removed or permission to everyone group (used by Anonymous user) is revoked you would see same issue replicated. 

Avatar

Avatar
Validate 1
Level 2
carolynr5682886
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
carolynr5682886
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
carolynr5682886
Level 2

13-02-2019

Thank you.

  • 'cq:allowedTemplates' is defined on root page with proper value like /conf/<root>/settings/wcm/templates/.*

was missing from my root page. Once added I could see the page now.