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

GenericList.getItems() does not return any list item having null value. #2248

Closed
3 tasks
sagarmandal opened this issue Apr 3, 2020 · 11 comments
Closed
3 tasks
Milestone

Comments

@sagarmandal
Copy link
Contributor

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: 6.4.3.0
  • ACS AEM Commons Version: 3.17.0
  • Reproducible on Latest? yes (based on code)

Expected Behavior

GenericList.getItems() should return any item having null value similar to .../_jcr_content.list.json.
This will make it consistent as well as useful, where user may want to add an item having null value.
e.g., Dropdown Option as "Select" or "None". This dropdown option can be used to remove the previously selected value, if required.

Actual Behavior

GenericList.getItems() does not return any item having null value.
Whereas .../_jcr_content.list.json on the list page returns all items including item having null value.

Steps to Reproduce

  1. Create a Generic List

  2. Add multiple items, including one or more item having null value but with title (e.g., "None")

  3. Access the list page path suffixed with /_jcr_content.list.json. This will provide all items having non-null title.

  4. Write Java code to use Generic List API. e..g,
    PageManager pageManager = resourceResolver.adaptTo(PageManager.class);
    Page listPage = pageManager.getPage("/etc/acs-commons/lists/targets"); // e.g., /etc/acs-commons/lists/targets is our list
    GenericList list = listPage.adaptTo(GenericList.class);

    ///Check output of list.getItems();

Links

NA

sagarmandal pushed a commit to sagarmandal/acs-aem-commons that referenced this issue Apr 3, 2020
davidjgonzalez pushed a commit that referenced this issue Apr 11, 2020
…ving null value. (#2249)

Co-authored-by: Sagar Mandal <sagarm@criticalmass.com>
@davidjgonzalez davidjgonzalez added this to the 4.5.2 milestone Apr 18, 2020
@davidjgonzalez
Copy link
Contributor

Fixed in v4.5.2

@prasanna9936
Copy link

Hi David, i'm still having the same issue with latest acs commons package- 4.11.2. I see a blank screen in UI and the below error in logs: org.apache.sling.servlets.get.impl.DefaultGetServlet No renderer for extension html, cannot render resource JcrNodeResource, type=acs-commons/components/utilities/genericlist, superType=null,

@davidjgonzalez
Copy link
Contributor

Was this expected to be fixed in 4.11.2?

@prasanna9936
Copy link

I see it got fixed based of the release notes in 4.11.2
https://raw.githubusercontent.com/Adobe-Consulting-Services/acs-aem-commons/master/CHANGELOG.md

@davidjgonzalez
Copy link
Contributor

davidjgonzalez commented Jan 14, 2021 via email

@prasanna9936
Copy link

There is a full list in this link, https://raw.githubusercontent.com/Adobe-Consulting-Services/acs-aem-commons/master/CHANGELOG.md and search for #2248.

@davidjgonzalez
Copy link
Contributor

Oh - that was (allegedly) fixed back in 4.5.2 (last April).. maybe something regressed that fix since then ..?

@prasanna9936
Copy link

Yeah looks like it. Because that link has more than 100+ defects which can't be addressed in one release .

@davidjgonzalez
Copy link
Contributor

Correct. The change log is a running list of changer per release. Each release has a section in the chnagelog, newest at the top. Top of the chnagelog has a link to a web site that explains the format.

But I guess the important thing is the bug still exists and we need to be fixed :)

@prasanna9936
Copy link

prasanna9936 commented Jan 14, 2021

Yeah the bug exists, i'm more than happy to try any other ideas to isolate the problem to ACS. Let me know if you need some help in reproducing the issue.

Also, i have created a new issue considering this is a closed one. Feel free to close this to avoid duplicates or link this to new one.
#2510

@davidjgonzalez
Copy link
Contributor

This is with 5.3.2 installed:

2022-07-27 at 4 47 PM

2022-07-27 at 4 47 PM

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

3 participants