filament-fabricator: Undefined array key 1 related to PageRoutesService
i am getting this error when trying to clear config, route etc. i don’t know how to solve it. Anyone got any ideas?
at vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php:87
83▕ public function removeUrlsOf(Page $page): void
84▕ {
85▕ // First remove the entries from the (ID -> URI) mapping
86▕ $idToUrlsMapping = $this->getIdToUrisMapping();
➜ 87▕ $urls = $idToUrlsMapping[$page->id];
88▕ $idToUrlsMapping[$page->id] = null;
89▕ unset($idToUrlsMapping[$page->id]);
90▕ $this->replaceIdToUriMapping($idToUrlsMapping);
91▕
1 vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php:87
Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap\{closure}("Undefined array key 1", "C:\xampp\htdocs\nextxlfabricator\vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php")
2 vendor\z3d0x\filament-fabricator\src\Commands\ClearRoutesCacheCommand.php:47
Z3d0X\FilamentFabricator\Services\PageRoutesService::removeUrlsOf(Object(Z3d0X\FilamentFabricator\Models\Page))```
I did composer update. After this I started getting this error after config:clear or route:clear. And the fabricator pages were giving a 404.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 33 (2 by maintainers)
Commits related to this issue
- Properly replace the URI->ID and ID->URI mappings when the new ones are empty Fixes #198 — committed to Voltra/filament-fabricator by Voltra 2 years ago
- Properly replace the URI->ID and ID->URI mappings when the new ones are empty (#204) Fixes #198 — committed to KornaFilament/filament-fabricator by Voltra 2 years ago
this is config/filament-fabricator.php