fix: customer site lists stop at 100 sites (BerlinDB default number)
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
What
A customer with more than 100 sites cannot see or select the ones beyond the first 100 in the frontend account widgets. Customer::get_sites() passes no number, so BerlinDB applies its default of 100.
Evidence
The SQL the default call runs, captured with a query filter against the plugin's locked BerlinDB:
| Call | SQL limit |
|---|---|
$customer->get_sites() |
LIMIT 100 |
$customer->get_sites(['number' => 0]) |
no LIMIT clause |
$customer->get_sites(['number' => false]) |
no LIMIT clause |
$customer->get_sites(['number' => -1]) |
LIMIT 1 |
vendor/berlindb/core/src/Database/Query.php:476 sets 'number' => 100.
Do not copy the 'number' => -1 convention used elsewhere in the plugin (for example inc/functions/customer.php:68) for this query. With Site::query() it returns a single site.
Callers that use the default:
inc/ui/class-account-summary-element.php:319: the site selector shown when no site is chosen. Sites past 100 cannot be selected.inc/ui/class-my-sites-element.php:345: the My Sites list. Sites past 100 are not listed.inc/ui/class-magic-link-url-element.php:354: picks the best candidate site; the cap matters less here.
This is not new. It was raised by a review bot on #2133, and My Sites has the same cap on main.
Files Scope
inc/ui/class-account-summary-element.phpinc/ui/class-my-sites-element.phpinc/models/class-customer.php
Decision to make
Rendering every site is fine for a selector but could be heavy for a very large customer. Either lift the limit for the selector only ('number' => 0), or paginate both lists. Keep the behaviour of customers with up to 100 sites unchanged.
Reference pattern
inc/models/class-customer.php:666 builds the query from $query_args, so get_sites(['number' => 0]) already works without changing the model.
Verification
- Create 101 or more customer-owned sites for one customer (a short
wp evalloop creating blogs and assigning them withwu_get_site()->set_customer_id()), then open the account page without a site selected and confirm all of them are selectable. - Log the SQL for the call and confirm there is no
LIMIT 100. - With fewer than 100 sites, output is unchanged.
Tier
tier:standard. Files and evidence are known, but the all-versus-paginate choice is a design decision.
aidevops.sh v3.39.189 plugin for OpenCode
- Lenguaje dominante
- PHP
- Estrellas
- 219
- Forks
- 88
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Ultimate-Multisite/ultimate-multisite
-
bug origin:interactive status:available
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Ultimate-Multisite/ultimate-multisite#2131 ·
Los mantenedores suelen responder en 1 día
-
bug hold-for-review no-auto-dispatch origin:interactive status:available
Dificultad 3/5 1-2 días Aptitud para principiantes 20/100
Ultimate-Multisite/ultimate-multisite#2140 ·
Los mantenedores suelen responder en 1 día
-
enhancement hold-for-review no-auto-dispatch origin:interactive status:available
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
Ultimate-Multisite/ultimate-multisite#2137 ·
Los mantenedores suelen responder en 1 día
-
fix: My Sites, Limits and Current Membership columns above 3 collapse to one column (missing grid utilities)Posiblemente ocupada @superdav42 la tomó hoy. Abiertoauto-dispatch bug origin:interactive status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2134 · 5 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
security(sso): apply mapped-domain token policy to admin-bar magic linksPosiblemente ocupada @superdav42 la tomó hace 1 día. Abiertoauto-dispatch origin:interactive status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2125 · 5 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Ultimate-Multisite/ultimate-multisite
Issues similares
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quantum-php/framework#692 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
ajeetraina/awesome-docker-sbx#559 ·
-
dependencies enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
novalo-dev/Prestashop-MCP-Server#329 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día