tomatophp / filament-bookmarks-menu

Add bookmarks and tags to your resources records and access theme form your sidebar
MIT License
5 stars 0 forks source link

[filament-bookmarks-menu - 1.0.3] - Filament 3.2.117 - Error in Install #1

Open Mathissou01 opened 1 month ago

Mathissou01 commented 1 month ago
Typed property TomatoPHP\FilamentBookmarksMenu\Filament\Pages\Bookmarks::$bookmark must not be accessed before initialization

I'm facing an issue after installing the "FilamentBookmarksMenu" package on Filament.

Here is my composer.json

{ "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": [ "laravel", "framework" ], "license": "MIT", "require": { "php": "^8.2", "bezhansalleh/filament-language-switch": "^3.1", "charrafimed/global-search-modal": "^3.4", "filament/filament": "^3.2", "laravel/framework": "^11.9", "laravel/tinker": "^2.9", "pxlrbt/filament-spotlight": "^1.2", "tomatophp/filament-bookmarks-menu": "^1.0.3", "webbingbrasil/filament-advancedfilter": "^3.0" }, "require-dev": { "fakerphp/faker": "^1.23", "laravel/pint": "^1.13", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.1", "phpunit/phpunit": "^11.0.1" }, "autoload": { "psr-4": { "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi", "@php artisan filament:upgrade" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true } }, "minimum-stability": "stable", "prefer-stable": true } My "AdminPanelProvider", is like this

`use TomatoPHP\FilamentBookmarksMenu\FilamentBookmarksMenuPlugin; use pxlrbt\FilamentSpotlight\SpotlightPlugin; use CharrafiMed\GlobalSearchModal\GlobalSearchModalPlugin; // Already tried ->plugin(\TomatoPHP\FilamentBookmarksMenu\FilamentBookmarksMenuPlugin::make())

->plugins([ FilamentBookmarksMenuPlugin::make(), SpotlightPlugin::make(), GlobalSearchModalPlugin::make() ])`.

I already tried to uninstall and reinstall the package but still got this error.

3x1io commented 1 month ago

hi @Mathissou01 can you share the error? not your composer

3x1io commented 1 month ago

okay i find it on the title and I think it's just caching can you try

php artisan filament:optimize-clear
Mathissou01 commented 1 month ago

_> okay i find it on the title and I think it's just caching can you try


php artisan filament:optimize-clear
```_

I removed the package and completely reinstalled my project on a new machine. Everything was running smoothly until I installed the project using composer require tomatophp/filament-bookmarks-menu and executed php artisan filament-bookmarks-menu:install After that, I added the following code:

->plugins([
    FilamentBookmarksMenuPlugin::make()
]);

I also included use TomatoPHP\FilamentBookmarksMenu\FilamentBookmarksMenuPlugin; . When I accessed my dashboard, the plugin's component appeared. I tried to create a folder, but when I pressed submit, I encountered the following error:

Internal Server Error
Symfony\Component\Routing\Exception\RouteNotFoundException
Route [filament.admin.pages.bookmarks] not defined.
Capture d’écran 2024-10-16 140033

After reloading the page, I saw an older error:

Internal Server Error
Error
Typed property TomatoPHP\FilamentBookmarksMenu\Filament\Pages\Bookmarks::$bookmark must not be accessed before initialization.
Capture d’écran 2024-10-16 140112
avinmaster commented 2 weeks ago

+1

Mathissou01 commented 2 weeks ago

okay i find it on the title and I think it's just caching can you try

php artisan filament:optimize-clear

I still have the same error with Filament 3 and PostGreSQL on a fresh project.