Pages Field Not Showing All Pages in Admin Panel (Limit?)

Hello Grav Community,

Issue:

We are running a Grav site with over 1000 pages, and we noticed that the pages field in the Admin panel does not display all pages. Here’s the current blueprint configuration we are using:

.link:
  type: pages
  size: large
  classes: fancy
  show_all: true
  show_root: true
  show_modular: true
  toggleable: true
  label: Internal Link (Page or Section)

Even with show_all: true, we don’t see all pages in the dropdown. We suspect there might be a limit on how many pages are displayed due to performance constraints or a hardcoded limit in Grav’s Admin plugin.


Questions:

  1. Is there a known limit to how many pages the pages field can display in the Admin panel?
  2. Are there any workarounds or alternative solutions for handling a large number of pages?
  3. Would switching to a different field type (e.g., selectize) or implementing an AJAX-based lazy-loading solution be a viable option?
  4. Since our page count will continue to grow, what are the best practices for handling performance when dealing with thousands of pages in the Admin panel?

We use git-sync Plugin and the performance is really slow.

Any insights, workarounds, or suggestions would be greatly appreciated!

Best regards,

Christiana

Looking at the code I don’t see why it would limit with your setup. I guess it would require debugging your case specifically

The problem is that it stops scrolling at this point even though there are more pages. However, there are no other listed in the HTML source code of the dropdown.

In file system/src/Grav/Common/Page/Pages.php, function getList, I had the pages printed out the result with var_dump($list); and many more are printed out than are available in the dropdown box.

The missing pages:

 "—-—-—-▸ E-Rechnung Webinar Bestand" string(50) "—-—-—-—-▸ Einleitung" string(62) "—-—-—-—-▸ Unser Service für Sie" string(56) "—-—-—-—-▸ Webinaranmeldung" string(47) "—-—-—-—-▸ Partner" string(55) "—-—-—-—-▸ Weitere Termine" string(49) "—-—-—-▸ Test Boxes Module" string(58) "—-—-—-—-▸ Test - Boxes Icons" string(60) "—-—-—-—-▸ Test - Boxes Persons" string(58) "—-—-—-—-▸ Test - Boxes Image" string(59) "—-—-—-—-▸ Test - boxes prices" string(57) "—-—-—-—-▸ Test - 2 col text" string(52) "—-—-—-—-▸ Test - Cards" string(52) "—-—-—-▸ E-Rechnungen-Webinar" string(50) "—-—-—-—-▸ Einleitung" string(62) "—-—-—-—-▸ Unser Service für Sie" string(56) "—-—-—-—-▸ Webinaranmeldung" string(47) "—-—-—-—-▸ Partner" string(55) "—-—-—-—-▸ Weitere Termine" string(45) "—-—-—-▸ ERP Agenturen" string(46) "—-—-—-—-▸ Kunden" string(57) "—-—-—-—-▸ Einleitung ERP DL" string(55) "—-—-—-—-▸ Hauptfunktionen" string(51) "—-—-—-—-▸ TecArt USPs" string(49) "—-—-—-—-▸ Dashboard" string(54) "—-—-—-—-▸ CTA Testsystem" string(50) "—-—-—-—-▸ Testsystem" string(60) "—-—-—-—-▸ ERP DL Informationen" string(51) "—-—-—-—-▸ Zertifikate" string(46) "—-—-—-—-▸ Preise" string(59) "—-—-—-—-▸ Gründe für TecArt" string(49) "—-—-—-—-▸ Erechnung" string(48) "—-—-—-—-▸ Branchen" string(52) "—-—-—-—-▸ Testimonials" string(56) "—-—-—-—-▸ Buchungskalender" string(53) "—-—-—-—-▸ Beratungsteam" string(46) "—-—-—-▸ Leon Testseite" string(53) "—-—-—-—-▸ bild mit text" string(51) "—-—-—-—-▸ Zertifikate" string(57) "—-—-—-—-▸ Einleitung ERP DL" string(50) "—-—-—-—-▸ Testsystem" string(46) "—-—-—-—-▸ Kunden" string(51) "—-—-—-—-▸ TecArt USPs" string(60) "—-—-—-—-▸ ERP DL Informationen" string(48) "—-—-—-—-▸ Branchen" string(46) "—-—-—-—-▸ Preise" string(52) "—-—-—-—-▸ Testimonials" string(53) "—-—-—-—-▸ Beratungsteam" string(56) "—-—-—-—-▸ Buchungskalender" string(49) "—-—-—-—-▸ Leon Test" string(48) "—-—-—-—-▸ Formular" string(49) "—-—-—-▸ ERP Dienstleister" string(46) "—-—-—-—-▸ Kunden" string(57) "—-—-—-—-▸ Einleitung ERP DL" string(55) "—-—-—-—-▸ Hauptfunktionen" string(51) "—-—-—-—-▸ TecArt USPs" string(49) "—-—-—-—-▸ Dashboard" string(54) "—-—-—-—-▸ CTA Testsystem" string(50) "—-—-—-—-▸ Testsystem" string(60) "—-—-—-—-▸ ERP DL Informationen" string(51) "—-—-—-—-▸ Zertifikate" string(46) "—-—-—-—-▸ Preise" string(59) "—-—-—-—-▸ Gründe für TecArt" string(49) "—-—-—-—-▸ Erechnung" string(48) "—-—-—-—-▸ Branchen" string(52) "—-—-—-—-▸ Testimonials" string(56) "—-—-—-—-▸ Buchungskalender" string(53) "—-—-—-—-▸ Beratungsteam" string(54) "—-—-—-▸ ERP für Dienstleister" string(45) "—-—-—-—-▸ Trust" string(61) "—-—-—-—-▸ Hauptfunktionen Boxes" string(50) "—-—-—-—-▸ Wofür ERP" string(51) "—-—-—-—-▸ Was ist ERP" string(57) "—-—-—-—-▸ Projektmanagement" string(59) "—-—-—-—-▸ Rechnungsübersicht" string(49) "—-—-—-—-▸ Workflows" string(47) "—-—-—-—-▸ Artikel" string(42) "—-—-—-—-▸ CI" string(54) "—-—-—-—-▸ Artikel und CI" string(54) "—-—-—-—-▸ CTA Testsystem" string(57) "—-—-—-—-▸ Für wen geeignet" string(52) "—-—-—-—-▸ Branchen ERP" string(53) "—-—-—-—-▸ Ihre Vorteile" string(50) "—-—-—-—-▸ Referenzen" string(47) "—-—-—-—-▸ FAQ ERP" string(46) "—-—-—-—-▸ testen" string(46) "—-—-—-▸ Ihr CRM-System" string(51) "—-—-—-—-▸ Zertifikate" string(57) "—-—-—-—-▸ Einleitung TecArt" string(51) "—-—-—-—-▸ TecArt USPs" string(56) "—-—-—-—-▸ Buchungskalender" string(48) "—-—-—-—-▸ Branchen" string(52) "—-—-—-—-▸ Testimonials" string(50) "—-—-—-—-▸ Testsystem" string(53) "—-—-—-—-▸ Beratungsteam" string(53) "—-—-—-—-▸ Test Timeline" string(38) "—-—-▸ NewsTest blank" string(49) "—-—-—-▸ Überschrift News" string(49) "—-—-—-▸ Aktivita Massagen" string(43) "—-—-—-▸ ISO-Rollout" string(73) "—-—-—-▸ App für Sportler | Stipendium in Vietnam" string(44) "—-—-—-▸ Neue MA Anja" string(37) "—-—-—-▸ Anja2" string(38) "—-—-—-▸ Footer" string(37) "—-—-▸ TecArt - News" string(49) "—-—-—-▸ Überschrift News" string(32) "—-—-▸ Webinare" string(45) "—-—-—-▸ Ticketwebinar" string(51) "—-—-—-—-▸ Zertifikate" string(57) "—-—-—-—-▸ Einleitung TecArt" string(59) "—-—-—-—-▸ Informationsblock 1" string(55) "—-—-—-—-▸ _info-tickets-2" string(57) "—-—-—-—-▸ Kundenservice cta" string(48) "—-—-—-—-▸ Vorteile" string(62) "—-—-—-—-▸ kundenstimmen-vertrieb" string(51) "—-—-—-—-▸ TecArt USPs" string(56) "—-—-—-—-▸ Buchungskalender" string(50) "—-—-—-—-▸ Testsystem" string(53) "—-—-—-—-▸ Beratungsteam"

Maybe it could be a JS problem?

Doesn’t look like pages field has a dedicated JS

The field has data attributes, maybe it is in selectize.

But selectize is a different field. Pages doesn’t have that option

I don’t know what select widgets shows the dropdown of the pages. Thats why I need help.

In souce code it is an selectize field and it displays fewer pages than are actually available in the result.

pages field template:

Page list part:

@Karmalakas thank you!

This $list contains all pages. But in the output of the they are cutted off when scolling to the end of the

data-grav-selectize="{{ (field.selectize is defined ? field.selectize : {})|json_encode|e('html_attr') }}"

What do you have in field.selectize there? If it’s that truncated list, you need to find out where it is filled

@karmalakas

I tried to explain this in the 2nd post. The list isn’t actually truncated, the data is all there.

The var_dump in screenshot shows a list of all pages, thats what the Dropdown should do:

Output of var_dump:

Thats all fine. So I think the widget seems to have a bug because even though it has all the data, Dropbox doesn’t output all of it.

When I click into dropbox, JS Message appears in console:

image

Click on that arrow jumps to following JS code part:

I also opened an issue in the Admin Panel Plugin GitLab in case there are any insights there: Pages Field Not Displaying All Pages in Admin Panel · Issue #2444 · getgrav/grav-plugin-admin · GitHub

Steps to Reproduce:

  • Run a Grav site with over 1000 pages.
  • Use the pages field in a blueprint with show_all: true.
  • Open the Admin Panel and try to select a page.
  • Notice that the dropdown does not display all available pages.
1 Like