AEM-6.4 Original Value of sling:resourceSuperType for /libs/foundation/components/redirect - aem

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.

Related

Sightly syntax to retrieve crx/de properties in jsp/html page

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

Can't create page aem 6.3 [closed]

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.

AEM 6.2 How to change template of a page

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.

Adobe CQ5 component properties for templates

It seems to be quite basic problem, but I still cannot find a nice solution.
I made a component that uses a dialog property.
How could I avoid setting this property for every single page if this component is used also in template?
What I already have tried:
I set name attribute in dialog.xml to absolute path - Component stops working as standalone (dropped into parsys).
Move it to design_dialog.xml - First of all it's conceptually content, so I do not like such move, and again it doeas not make much sense for standalone versions.
Change resource path to absolute, while including in template:
<cq:include path="/content/site/somepage" resourceType="/apps/portal/components/myComponent" />
For the first look it was almost it. Instances included via parsys has it's own path, and Content for template is fetched from single resource... But where to store it, to make template code independent from pages tree structure?
Is there any other nice way to do so? or at least way to improve 3.?
To the original poster, the functionality you are looking for is now supported by Shared Component Properties in ACS AEM Commons (http://adobe-consulting-services.github.io/acs-aem-commons/features/shared-component-properties.html)
Compared to your suggested solutions:
No need for absolute property path required for SCP
Agreed these are "content" properties, so they should be stored as "content" instead of "design". SCP stores these values under the homepage node of a site, making them as genuine of content as any other piece of content.
Agreed that it is bad to have a template hard-coded to a content path of a single site, especially since this makes a multi-site implementation impossible without creating a bunch of templates. SCP does not have this problem, because each site has its own homepage under which the properties are stored.
If I understand correctly, you have a component which may work in two modes:
it may be included statically in the main page renderer via <cq:include>
it may be also dropped into some parsys.
In the first mode component should have some common configuration for all pages and in the second mode it should be configured separately per-instance. The problem is how to create such common configuration.
I think your 3rd solution is perfectly fine assuming that the component configuration is shared by all sites in your CQ instance. At some point it may be too strong assumption, eg. you may have a 3 language branches under /content/site-en, /content/site-fr and /content/site-de and you'd like to make a separate configuration for each branch.
I'd suggest following improvement to the 3rd solution: you may create the shared component under some relative path which will be the same for all pages, like /content/.../configuration/shared-component (where ... may be site1, site2 or site3). Then take first two parts of the current page path, add the /configuration/shared-component suffix and use <cq:include> to include path created in such way.
You may also take a different approach and create a common configuration page referenced by all statically included components. These components may try to find their configuration automatically (via the relative path as above) or they may have a single pathfield that references configuration page.
If you don't like these options (as they assume some site structure or they need some minimal configuration for each component), consider using HierarchyNodeInheritanceValueMap. It allows you to get property from the current resource and if there is no such property, it'll look into the same resource on ancestor pages. Using this you could configure your component just once, in the site root page and inherit configuration across the whole site.

TYPO3 does not resolve url correctly

I'm pretty new to TYPO3 and currently stuck with the following issue:
I copied the templates from another webpage that is currently in business.
When I'm on the startpage of my homepage (www.domain.com) and click on one of the links it contains I always get an error 404. The link that is generated looks like this.
http://www.domain.com/testpage.440.0.html
So I guess something like RealUrl was in use on the webpage that I copied from? Do I understand this right? I don't see that RealUrl is installed though.
However If i manually change this link to
http://www.domain.com/?id=440.0.html
the site is being created.
How does Typo3 know to generate a page when it receives the first version of these two links?
Does not really look like a standard out-of-the-box REAL URL url. That would rather have been /testpage-404.html . So maybe the problem is somewhere else, could be:
simulate static (check if that extension is running). A common mistake is to run real url an simulate static at the same time. If you do not need speaking urls for the moment, just uninstall simulate static.
make sure you add a domain to your shortcut. Use the the list modul and select the root shortcut. Then click create new record, select domain. and enter your domain there. Flush all the caches and try again.
If you'd post your TS Code (of the root shortcut page) here, I could probably tell what's going wrong.
real url configuration typically use .htaccess files.. maybe that file still contains information from the original destination.
check if the root ts contains some baseUrl statement
Which version of TYPO3 are you using?
HTH, but feel free to post more infos.
If your typoscript template is expecting to find realurl and its not installed as a plugin, that could be the cause. You'll need to either install it, or find the settings in the TS template and remove them.
Try the template object browser to look for it (use the template tool, click to the site root, then use the drop down menu in the r/h pane to choose the Template Obect Browser.)
How does Typo3 know to generate a page when
it receives the first version of these two links?
Any page request that it doesn't understand will give a 404 error.