core icon indicating copy to clipboard operation
core copied to clipboard

Display Bug in Template Dropdown: Missing Templates and Console Error

Open Neehakethi opened this issue 1 year ago • 5 comments

Parent Issue

No response

Problem Statement

We have identified a display bug in the "Template" dropdown select field that prevents users from seeing all available templates. The issue is reproducible in our demo environment.

Steps to Reproduce

  1. Create a new "New Page".
  2. Open the "Template" dropdown select field.
  3. I have created sample 15 test templates
  4. Click 'More choices' to navigate to the next page of templates.
  5. Click 'Previous choices' to go back to the first page.
  6. Notice the following:
  7. The dropdown doesn't include the test2 template (for eg) which is expected to appear once we click on more choices/previous choices
  8. Repeating navigating back and forth between 'More choices' and 'Previous choices' didn't seem to help.

Customer observations included :

The template list becomes inconsistent, with templates being jumbled or incorrectly displayed. An error appears in the browser console: (Repeatedly selecting previous/more choices) Uncaught RangeError: Maximum call stack size exceeded

https://github.com/user-attachments/assets/b16a39ca-ba11-48ec-a385-e0e1d703f0d8

Acceptance Criteria

The "Template" dropdown should consistently display all available templates across pages. Navigating between pages should not result in templates being hidden, duplicated, or jumbled. No console errors should occur during the selection process.

dotCMS Version

Demo version : 24.11.29 Customer version : 23.10.24 LTS

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.freshdesk.com/a/tickets/28608 https://dotcms.freshdesk.com/a/tickets/31138

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

Neehakethi avatar Dec 05 '24 18:12 Neehakethi

PRs:

  • https://github.com/dotCMS/core/pull/32241
  • https://github.com/dotCMS/core/pull/32420

github-actions[bot] avatar May 26 '25 20:05 github-actions[bot]

Working as it should, now we're able to actually see more options when clicking More Choices or Previous Choices

erickgonzalez avatar May 29 '25 19:05 erickgonzalez

This broke two issues:

  • https://github.com/dotCMS/core/issues/30660
  • https://github.com/dotCMS/core/issues/32414

Let's revert this one, and try to find another solution for this.

erickgonzalez avatar Jun 13 '25 15:06 erickgonzalez

There are templates that are being listed and then dissapear and we can't reach to them again with the More/Previous choices option.

For example in this video, Landing Page, Destination, Blank are templates that at first I can see but then I don't, no matter what option I choose.

https://github.com/user-attachments/assets/b8a54ddb-6959-4ba1-9866-35f68917b8d0

gortiz-dotcms avatar Jun 16 '25 19:06 gortiz-dotcms

QA Rejected:

Now it seems to be working a little better but when we navigate through the choices a bit it breaks.

https://github.com/user-attachments/assets/e55e5f2b-a19b-47a8-a02b-802433e1f3b6

gortiz-dotcms avatar Jun 17 '25 21:06 gortiz-dotcms

Working better as it was, I'm able to navigate between pages when selecting a template.

https://github.com/user-attachments/assets/621ad9d5-ec1b-4185-8495-464b2e26e903

erickgonzalez avatar Jul 01 '25 21:07 erickgonzalez