Issue after update to 3.1
i did a composer update and I am getting this error on the createpage of all the resources:
Solution:Jump to solution
That's probably the issue. Try removing it and see whether it fixes your issue
44 Replies
anyone deal with such a problem?
At least provide a stack trace or some code. This is impossible to debug with the information given.
here is the error stack trace :https://gist.github.com/devcbash/7d79ede9487b81e3769cc474c2cdd54a Laravel 10.40.0. I just upgraded via composer install
Gist
trim(): Argument #1 ($string) must be of type string, array given
trim(): Argument #1 ($string) must be of type string, array given - gist:7d79ede9487b81e3769cc474c2cdd54a
Can you share your code and share the Flare exception page instead of that text stack trace
it happens on resource pages /create, /edit, I can see the resources page table. only if i want to create new or edit. https://flareapp.io/share/Vme9gZAm on all resource pages. code:https://gist.github.com/devcbash/e2c9802cefa1911a64d75e51151d34d8
Hm, hard to tell. Try removing stuff until it works and see what is causing the issue.
thanks, i do not see how flare helps me here. I can't pinpoint the issue
The issue is coming from the attributes on a class. But it's hard to tell which one. That's why I suggest to remove stuff
maybe my update process is wrong? I changed the filament version in the composer.json to 3.1 and did composer install
should I open an issue about it?
Before opening an issue, try to break it down, or reproduce it in a new install
can you suggest what to focus on?
Not really
I just updated to 3.2 and now I get this same error.
It appears to be related to Table Filters @Dennis Koch @core
All resources with filters are broken. When I comment out:
Then things go back to working normally
FYI I'm using Filament 3.2 and upgraded from v2 about a month ago. When I upgraded to 3.2 today, this is when the problem with broken resources began.
UPDATE: @core @Dennis Koch I just ran
php artisan optimize:clear
and all went back to normal. Okay, that was easySo you don't have
artisan filament:upgrade
in your composer post install scripts?Apparently not!
I added it so it looks like this now: Should it stay like that for now on?... even though I am fully upgraded?
I added it so it looks like this now: Should it stay like that for now on?... even though I am fully upgraded?
yeah it should stay like that
Does that mean, every time I run
composer dump-autoload
or dump-autoload gets triggered via script, php artisan filament:upgrade
is run after the dump-autoload is complete? (trying to learn this stuff) -thanksyeah
artisan filament:install
should've otherwise added it to scripts for you when you initially installed filamentIf I remember correctly round 1 with the upgrade didn't go so smoothly so I did more of a manual upgrade. That was half of a Saturday upgrading from v2 to v3. I suck at this stuff. but loving v3
ahh yeah not sure if it gets added when upgrading from v2 – but yeah otherwise it should be good now 😄
Thanks buddy.
So at the end you just ran the php artisan command?
At the end he cleared the cache via
php artisan filament:upgrade
Which should be the default if you follow the docs.I thought this command was just for upgrading whole versions like from 2 to 3. Im trying to understand the order of things to upgrade correctly. this is not clear from the docs. From 3 to 3.1 /3.2
i dont think the filament upgrade package for v2 to v3 mentioned in the docs does it automatically, but otherwise,
filament:upgrade
should be in post-autoload-dump
as it has changes often and needs to publish its assets in most cases.
you can see in the filament:install
command that it gets added here: https://github.com/filamentphp/filament/blob/49be4992a5c5df58d9702de5817a6a7fbf8e1aef/packages/support/src/Commands/InstallCommand.php#L156-L163
which is reflected in my starter: https://github.com/Log1x/filament-starter/blob/main/composer.json#L50GitHub
filament-starter/composer.json at main · Log1x/filament-starter
A beautiful starting point for your next TALL stack project using Filament. ⚡ - Log1x/filament-starter
Nope. This is in the installation guide: https://filamentphp.com/docs/3.x/panels/installation#upgrading
I found the issue it is when using the Section Component in the Form Builder if I comment it out it works fine
Hm weird. Look good to me.
yep
Did you publish any view files?
for this resource no
In general. Did you publish Filament's vendor files?
yes, I'm using shield
That's unrelated. Are there files in
resources/views/vendor/filament
?yes
the components folder
Solution
That's probably the issue. Try removing it and see whether it fixes your issue
thanks !great fixed that, I don't remember why I published that
Please never do unless you really have to. Because they will get outdates and break
just to be clear to update 3.1 to 3.2 you run composer update each time there is a stable release?
Sorry, I don't understand?
to upgrade filament from 3.1 to 3.2
Normal composer update is enough to update minor versions
great, many thanks
have a good one