Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form Option with Datasource throws error | getItems throws null while override #1461

Open
ckj0369 opened this issue Mar 25, 2021 · 2 comments

Comments

@ckj0369
Copy link

ckj0369 commented Mar 25, 2021

Hi Team,

I'm trying to overlay form option.java to get the data in json format using exporter framework.
However, everything works as expected with the override and to get items data I've used:

@Override
    public List<OptionItem> getItems() {
        return superSelf.getItems();
    }

This method throws error when option is selected from Datasource ERROR [OptionsImpl.java] Failed to include the datasource at weretail/components/form/options/datasource/countriesdatasource
org.apache.sling.api.request.RecursionTooDeepException
Same works fine with Local and List.

Also raised here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/form-option-datasource-error-in-getitems/qaq-p/401455#M87221

@ckj0369
Copy link
Author

ckj0369 commented Mar 26, 2021

ERROR [OptionsImpl.java] Failed to include the datasource at weretail/components/form/options/datasource/countriesdatasource 
org.apache.sling.api.request.RecursionTooDeepException: /content/ckj/testpage/jcr:content/root/options
	at org.apache.sling.engine.impl.request.RequestData.setContent(RequestData.java:571)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:312)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
	at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516)
	at com.adobe.cq.wcm.core.components.internal.models.v1.form.OptionsImpl.populateOptionItemsFromDatasource(OptionsImpl.java:209)
	at com.adobe.cq.wcm.core.components.internal.models.v1.form.OptionsImpl.populateOptionItems(OptionsImpl.java:161)
	at com.adobe.cq.wcm.core.components.internal.models.v1.form.OptionsImpl.getItems(OptionsImpl.java:107)
	at sun.reflect.GeneratedMethodAccessor185.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

Above is the error from the log when we use datasource, any idea ?

@bruno-bradach-sn
Copy link

bruno-bradach-sn commented Oct 31, 2023

@ckj0369 Were you able to solve this? I'm experiencing the same issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants