Closed numirov closed 4 years ago
I am also trying to use the Core component v2 directly in the HTL file of my component. <div data-sly-resource="${'title' @ resourceType='core/wcm/components/title/v1/title'}"></div>
While trying to open the dialog, I get the same NPE
I am also facing the same issue while trying to embed Title component. To add more context to the above issue. PFB screenshot FYI...
AEM Version : 6.5.2 Core Components Version : 2.7.0
The code for this issue is merged to master and will be available in the upcoming 2.8.0 release.
Bug Report
Current Behavior I have a proxy title component based on v2 title. I am overriding its dialog to hide linkUrl. I have custom banner component. Inside of it i am including title component:
<div data-sly-resource="${'title' @ resourceType='mysite/components/content/title', decoration=true}" ></div>
I also have parsys:<div data-sly-resource="${'par' @ resourceType='wcm/foundation/components/parsys', decoration=true}" ></div>
So i drag and drop banner component on a page. It already has title component inside of it. But when i try to open dialog of title it throws NPE.
I guess it is because there is no title node, it is "synthetic" it will appear only when i configure and save it. But i cant do that because of npe. There is no null check after getResource call inside AllowedTitleSizesDataSourceServlet
Expected behavior/code Title component should be editable when included as data-sly-resource.
Environment
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
)Possible Solution Check for null and if resource is null(synthetic) return some predefined allowed types
Additional context / Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.