Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I'm using AEM,and meet a problem.
Firsly follow these steps
Secondly the page is below:
I create the page based on the Summit Toys Base Content Page template.
step1
but click next button ,the page shows like below:
step2
why and how to solve this issue.
Thanks advance!
This should be your problem. From your reference application, You have created a template under:
--apps
-- summit_toys
-- templates
and then the corresponding page rendering component under
--apps
-- summit_toys
--components
--structure
I am 90% sure, your page rendering component /apps/summit_toys/components/structure/contentpage is missing property sling:resourceSuperType = wcm/foundation/components/page. This brings the page properties dialog on the create page wizard. Check for spelling and case sensitive to exactly match above.
Other possibilities:
Make sure template sling:resourceType points to relative path of page rendering component (like summit_toys/components/structure/contentpage)
Check for typo, spelling errors. JCR standard prefers to keep all nodes in lower case (for good reason). Make sure your nodes are lower case; hyphenated if required.
Issue should get resolved with sling:resourceSuperType = wcm/foundation/components/page. If still fails, you might need to share /apps package to check further.
which version of aem you are using.
if it is 6.3, after creating your page, check if your page is there or not under content node in CRX
If it is there the check resource type is correctly mapped accordingly or not.
Hope this helps
I faced the same issue and is resolved
check this image
issue is related to value of cq:allowedTemplate for /content/wetrain/jcr:content
This issue can occur if you have not created dialog(cq:dialog) for your page component. Either you can create cq:dialog/ or extend out of the box page component using property sling:resourceSuperType as mentioned by Dhiraj Khursade.
If you are using editable templates, check for sling:resourceType property under /conf/<project>/settings/wcm/templates/<template-name>/structure/jcr:content and /conf/<project>/settings/wcm/templates/<template-name>/initial/jcr:content both should point to correct page component <project>/components/structure/<page-component>
Also make sure that, page component has correct value for sling:resourceSuperType with valid page component from core components or wcm core component. Try creating fresh new page and validate instead of trying on existing page.
Related
I have accidentally make changes to the sling:resourceSuperType value of /libs/foundation/components/redirect in CRXDE. I have tried to google from AEM site like https://www.aemcomponents.dev/ to get the answer, but still no avail.
I would like to know the original value that set to the sling:resourceSuperType. It will be good if someone can share the value here, or will even better if able to share any other site and guide that can get the original properties of each AEM components.
foundation/components/page is the sling:resourceSupertype for /libs/foundation/components/redirect
(The 'redirect' component refers to a page. Hence, its super-type is 'page')
Also you can always copy your jar with a new name and port and extract it. It will create a vanilla system and there you can check it.
I would like to retrieve some properties e.g. jcr:created using Sightly or any related syntax for the panel component in AEM adaptive forms. 1
The previous Sighlty syntaxes that I have attempted to retrieve the crx/de properties include:
${properties.jcr:created}
${pageProperties\[jcr:created\].getTime.toString}
${guidePanel.jcr:created}
${resource.jcr:created}]
I have tried the following syntaxes but unable to retrieve the value from the property and in worst cases, the component may not be rendered on screen.
I have looked up on Adobe forum sites and past stackoverflow questions that other people may have asked. I have tried the solutions and given answers but was unable to achieve the result. I would greatly appreciate for any help or sharing of applicable knowledge if you have encountered similar issues or previously attempted to solve similar problems. Thank you!
You can always create Use class in Java or Javascript to access these properties, it's cleaner and testable. Better than that, you can use Sling Models which are more readable and easier to implement, here is a good presentation about it https://www.slideshare.net/accunitysoft/understanding-sling-models-in-aem
Properties of resources are readable without any extra definitions needed.
So you might want to check what resource is handled in your component by adding this:
${resource.path}
Then you can check the returned path in CRXDE if there really is a jcr:created property available at this path - which should be the case if you are accessing a resource that has a proper sling resource type. Then this call should give a valid return value:
${resource.path} ___ created:
${properties.jcr:created.getTime.toString}
If the path is not displayed as well, then it would help if you could post
the repo path of the content resource you are processing
the sling:resourceType
the path to the component's ht(m)l file that you are using
I have created live copy of a page branch from sample website, inside my website. I was just trying to update the template so that I can create a local copy of the template used with original page and then change the UI. I can see the property with the cq:template and sling:resourceType as component name in development environment(CRXDE Lite). Can anyone suggest if we can update the property to change the template and component or if there any other way to change the template.
You can update cq:template and sling:resourceType on page/jcr:content node with corresponding new values and it would effectively change the template of page.
you might run into errors if code on new page component is expecting a different content than what is currently under your jcr:content.
ps- I dont know what your use case is but this would be very crude approach and should be avoided.
Suppose we have a page and it has header and footer links. For which we can edit the value using the header/footer dialogs of the components. Now, I want to check that who all have updated those links in any specific environment. How can I check that?
From the page properties, it just shows who made the last update (cq:lastModifiedBy property), but I need the specific versions/history of the page.
Do you want to check this in AEM or in your Code?
The sitekick provides a list with versions that have been created. See the official documentation.
If you want to load versions in AEM, please have a look at this (older) Blog post which describes how to use the VersionManger to work with Versions.
Versions are stored in /jcr:system/jcr:versionStorage within a node named by the first letters of the UUID assigned to a page (jcr:uuid)
When I create a live copy of a blueprint website, and rollout pages using standard rollout config, links in the pages are updated to reflect the live copy version.
ex. /content/myblueprintwebsite/home.html -> /content/mylivecopywebsite/home.html
But when those paths are buried inside properties of the page content nodes, they are not updated, and still points to the blueprint pages.
... is this the intended behavior? If so I guess I would have to write my own rollout config? Or is there another solution to this problem?
Thanks for your answers.
As per: https://docs.adobe.com/docs/en/aem/6-1/administer/sites/msm/msm-livecopy.html
"
When the blueprint source contains links and references that target a paragraph in a different chapter, the targets are not updated in the live copy pages. For example, a live copy is created from the Geometrixx Demo Site blueprint. Links in the Toolbar chapter that target the Services chapter are not updated in the live copy, and continue to target the original pages in the Geometrixx Demo Site.
"
My interpretation of the above:
- If the link to the target is created on a page that is in the ancestral line, the change will reflect in live copies.
I tested this by configuring a link to bp/en/parent/child-page on the bp/en/parent page and also on the bp/en page.
In both cases, the corresponding live-copy/... pages reflect changed paths to the live copy specific child page.
Moreover, the change is happening for links no matter what widget is used - OotB List, a customized link widget, or hyperlink configured in the text widget.
Further question:
Editors may want to create links from pages that is not in the ancestor line. What then? Is there a configuration that can be set to allow the change to happen ? Or are we required to write custom rollout action?
When ever a page rollout is done it updates all the individual content references for ex:
paths in property nodes, if it is stored individually i.e., not concatenated with any other text like: hello /content/test/master/en.
It doesnt update if the path is in the mid of other text.
And
Creating custom roll out doesn't server your purpose.If u really want to create custom roll out to meet this requirement then you have to create following custom live actions and write logic to find paths and then modify them.
1.ContentCopyActionFactoryCustom
2.ContentDeleteActionFactoryCustom
3.ContentUpdateActionFactoryCustom
Creating custom roll out is a risky option as roll out is called from many places like while creating live copy,from blue print section , roll outing a page and its sub pages and background execution etc.,We have to handle any exception caused in this explicitly.If u start changing one file then u end up changing all related files has roll out implementation on many java classes.
Ideal Solution : Save all the paths in a individual property and AEM will take care of updating there references
Cheers !!