Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Issues with parbase component

Avatar

Level 4

Hello Community, 

 

We're working on the cloud migration and we see some issues with the BPA report complaining about "Legacy foundation custom components were detected". The custom component is having a property called resourceSuperType which is pointing foundation/components/parbase. Can someone tell me what core component I need to use it for the parbase component rather than removing the property from the custom component. Thank you!

1 Accepted Solution

Avatar

Correct answer by
Level 8

Parbase is just a component from which you extend to get some OOTB functionality.

If I can say in technical language, Parbase is a key component as it allows components to inherit attributes from other components, similar to subclasses in object oriented languages such as Java.

For example, when you open the /libs/foundation/components/text node in the CRX Explorer, you see that it has a property named sling:resourceSuperType, which references the parbase component. The parbase here defines tree scripts to render images, titles, and so on, so that all components subclassed from this parbase can use this script.

While creating your own components, you don't need to add 'parbase' as a supertype, unless your components need to be enabled with drag-drop in a parsys.

AFAIK, the parbase component is never used explicitly, but only facilitates the rendering of a component when added in the Parsys.

"The parbase allows components to inherit attributes from other components"

If you check under "/libs/foundation/components", most of the authorable and draggable components have 'parbase' set as their 'sling:resourceSuperType' so that they can inherit the image and text rendering properties when added to a Paragraph system (Parsys Component).

 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 8

Parbase is just a component from which you extend to get some OOTB functionality.

If I can say in technical language, Parbase is a key component as it allows components to inherit attributes from other components, similar to subclasses in object oriented languages such as Java.

For example, when you open the /libs/foundation/components/text node in the CRX Explorer, you see that it has a property named sling:resourceSuperType, which references the parbase component. The parbase here defines tree scripts to render images, titles, and so on, so that all components subclassed from this parbase can use this script.

While creating your own components, you don't need to add 'parbase' as a supertype, unless your components need to be enabled with drag-drop in a parsys.

AFAIK, the parbase component is never used explicitly, but only facilitates the rendering of a component when added in the Parsys.

"The parbase allows components to inherit attributes from other components"

If you check under "/libs/foundation/components", most of the authorable and draggable components have 'parbase' set as their 'sling:resourceSuperType' so that they can inherit the image and text rendering properties when added to a Paragraph system (Parsys Component).

 

Avatar

Employee

When migrating from legacy foundation components to modern core components in Adobe Experience Manager (AEM), it's important to identify the equivalent core components that can replace the deprecated ones. In your case, you're dealing with a legacy custom component that has a resourceSuperType pointing to foundation/components/parbase. The parbase component was a base component in AEM that provided a set of basic functionality for other components to extend.

To replace the parbase, you should consider using the equivalent core components that provide similar functionality. There isn't a direct one-to-one mapping for parbase as it was a foundational component for many other components. Instead, you'll need to identify the purpose of your custom component and find a core component that aligns with its functionality.

For instance, if your custom component is used for text-based content, you might look into the Text or Rich Text Core Components. If it's for images, the Image Core Component could be suitable. For more complex functionalities, you might need to extend an existing Core Component or create a new one based on the guidelines provided by Adobe.

Here are some general steps to follow for migrating to Core Components:

  1. Assess your existing custom component to understand its functionality.
  2. Review the list of available Core Components and identify which one matches the functionality of your custom component.
  3. If a direct match isn't found, consider extending an existing Core Component or creating a new one following the Component Guidelines provided by Adobe.
  4. Utilize the AEM Modernization Tools, which can help convert foundation components to Core Components among other things. Note that these tools are a community effort and not officially supported by Adobe.
  5. Update your project's pom.xml to remove any dependencies on the legacy Core Components if migrating to AEM as a Cloud Service.
  6. Test the new or extended Core Components thoroughly to ensure they meet the required functionality.

Avatar

Community Advisor

Hi @s1101v 

If you are migrating to AEM as a Cloud Service, it is recommended to use the Core Components library instead of the legacy foundation components. The Core Components library provides a set of reusable components that are optimized for AEM as a Cloud Service and follow best practices for development.

In the case of the `resourceSuperType` property, you can use the `core/wcm/components/text/v2/text` component as the resource super type for your custom component. This component is based on the `foundation/components/text` component and is optimized for AEM as a Cloud Service.

To use the `core/wcm/components/text/v2/text` component as the resource super type for your custom component, you can update the `resourceSuperType` property in your component's dialog.xml file to the following:

<resourceSuperType>core/wcm/components/text/v2/text</resourceSuperType>
After making this change, you can rebuild and redeploy your custom component and run the BPA report again to verify that the issue has been resolved.



Avatar

Administrator

@s1101v Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni