[6.x]: CP nav items resolve to site URLs instead of CP URLs when cached outside CP requests
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start in CraftCms\Cms\Cp\Navigation::getTree() and trace its DependencyCache handling, then compare the use of Url::url() with Url::cpUrl(). Verify that relative CP navigation paths generated outside CP requests are cached with CP URLs rather than site URLs, while existing absolute URLs continue to work.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
Description
The latest alpha changed the behavior of my nav. I'm able to resolve it on my side but it may be a symptom of a behavior change worth sharing. I was previously passing in relative paths to NavItem and have updated to pass absolute URLs which don't get rendered with the wrong base path.
Per AI tooling:
It appears in CraftCms\Cms\Cp\Navigation, CP navigation items are cached server-side via DependencyCache for 1 hour in getTree(). During tree building, each item's URL is normalized using Url::url() instead of Url::cpUrl().
Because Url::url() checks request()->isCpRequest(), any process that triggers CP navigation generation outside of an active CP browser request (e.g. CLI Artisan commands, queue jobs, test suites, or front-end Twig calls) normalizes relative CP paths into site URLs instead of CP URLs, and bakes them into the 1-hour cache.
Craft CMS version
6.0.0-alpha.19
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
- Lingua principale
- PHP
- Stelle
- 3.6k
- Fork
- 705
- Merge medio
- 15h 22m
- PR unite (30g)
- 218
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 craftcms/cms
-
bug repo:cms
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
craftcms/cms#19829 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug repo:cms
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
craftcms/cms#19809 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
craftcms/cms#19761 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
craftcms/cms#19675 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
craftcms/cms#19214 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di craftcms/cms
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
thephpleague/commonmark#1159 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
awslabs/aidlc-workflows#1879 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] The PHP file that lists DNS records truncates records to 12 characters?Forse già presa @sahsanu l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hestiacp/hestiacp#5769 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug customer-reported
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
MagnaCapax/PMSS#1011 ·
I maintainer di solito rispondono entro 5 giorni
-
Talk Review
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
socallinuxexpo/scale-drupal#351 ·