fix: resolve effective limitations in non-primary networks and isolate caches
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- backend, databases, testing-qa
Direzione di ricerca
Start with inc/objects/class-limitations.php:461-502 and trace the canonical network-aware metadata table resolver before changing the early lookup or cache keys. Then inspect inc/models/traits/trait-limitable.php and the invalidation paths, including remove_limitations(). Extend tests/WP_Ultimo/Objects/Limitations_Test.php with synthetic two-network fixtures; done means network-specific reads, cache isolation, invalidation, inheritance, and bootstrap behavior all pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Goal
Resolve product/membership effective limitations from the correct network metadata
tables and isolate limitation caches between networks. This is required before
relying on product limits during native trial-site provisioning.
Observed behaviour
With Ultimate Multisite 2.16.1 and the Multi-Network addon active, read-only checks
on a non-primary network found two products where
count((array) $product->get_meta('wu_limitations', [])) was 11 but
count($product->get_limitations()->to_array()) was 0. Another product resolved
11 modules. No product settings or customer records were modified for the check.
The reason for that third product's differing result has not been established.
Upstream main was inspected and retains the same relevant code:
inc/objects/class-limitations.php:461-502,early_get_limitations(), builds
the table directly as{$wpdb->base_prefix}{$wu_prefix}{$slug}meta.- Its static cache key is only
sprintf('%s-%s', $slug, $id). inc/models/traits/trait-limitable.php:73-76switches from the model's normal
metadata API to this early lookup aftermuplugins_loaded.
This suggests a mismatch between the early lookup and the active network's model
metadata routing, with a separate risk of cache collisions for overlapping IDs.
Verify the routing contract before choosing a fix; do not assume missing limits
are simply a product configuration error.
Implementation scope
- Audit and fix the early metadata lookup in
inc/objects/class-limitations.php.
Use the canonical network-aware table resolver; do not hard-code an addon table
prefix. The appropriate resolver must be identified during implementation. - Include effective network/table identity in static cache keys and audit the
corresponding invalidation paths, includingremove_limitations(). - Preserve the special handling of native site/blog metadata and early bootstrap
when the full model layer or addon hooks are not available. - Inspect
inc/models/traits/trait-limitable.phpfor related per-object cache
isolation requirements. Do not weaken or bypass limits as a workaround. - If the routing contract belongs to the Multi-Network addon, coordinate that
fix there instead of adding an incompatible core-only naming assumption.
Verification
Extend the existing tests/WP_Ultimo/Objects/Limitations_Test.php and applicable
limitation tests; no new test framework is needed. Create fixture products in two
networks with distinct site/disk limits and overlapping IDs when the storage
model permits that. Verify:
- Normal model metadata and effective limitation results agree in each network.
- Switching networks and restoring the original network in one request does not
reuse another network's cached result. - Updating/removing limits invalidates only the intended cached data.
- Membership/site inheritance enforces the correct product limits.
- Primary-network, site/blog metadata and early-bootstrap behaviour remain valid.
Use synthetic fixtures only. Do not reproduce by altering live customer records.
aidevops.sh v3.34.13 plugin for OpenCode v1.18.31 with gpt-6-astra
- Lingua principale
- PHP
- Stelle
- 215
- Fork
- 86
- Merge medio
- 10h 34m
- PR unite (30g)
- 61
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Ultimate-Multisite/ultimate-multisite
-
Avoid undefined enabled-key warnings in limitation checksForse già presa @superdav42 l’ha presa oggi. Apertabug origin:interactive status:in-review
Ultimate-Multisite/ultimate-multisite#1909 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
hold-for-review no-auto-dispatch origin:interactive status:available type:bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Ultimate-Multisite/ultimate-multisite#1892 ·
I maintainer di solito rispondono entro 1 giorno
-
auto-dispatch hold-for-review origin:worker review-followup source:review-scanner status:available tier:standard
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Ultimate-Multisite/ultimate-multisite#1867 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
fix(ci): PHPUnit batching silently omits most tests on PHP 8.2, 8.4 and 8.5Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaauto-dispatch bug origin:worker priority:high source:ci-feedback status:available tier:standard
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Ultimate-Multisite/ultimate-multisite#1839 · 47 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
auto-dispatch blocked-by:GH#1805 origin:interactive priority:medium quality-debt status:blocked tier:standard
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
Ultimate-Multisite/ultimate-multisite#1808 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Ultimate-Multisite/ultimate-multisite
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
PrestaShop/PrestaShop#43140 ·
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 3 giorni
-
[Bug] Report tables drop a metric's trailing zeros and cap it at two decimalsForse già presa @lansow l’ha presa oggi. ApertaPotential Bug triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matomo-org/matomo#25474 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
coollabsio/shoutrrr#190 ·