Closed patriktoth67 closed 2 months ago
HI Patrick, did you run the storage:link command?
Ahh, I cloned my app to a new server recently, and forgot to run that command. I'll check next midnight if it solved the issue, thank you very much for the help!
So the storage:link has been run, but I still get the same error every midnight.
So the storage:link has been run, but I still get the same error every midnight.
Hi @patriktoth67 , you can show some entries from "filament_email_log" table? I think there's a problem into "raw_body" value.
The "raw_body" value must be like this:
filament-email-log/20240826144000_zPvtf/b6a225063e20fd432542bb6d0f07f8f4@test.example.com.eml
It is not like that for many rows, even for ones which were created after my update. They contain the full raw html of the email, and also the sender, reply-to, subject etc. before raw html.
The format you sent is only on emails sent after the update, and only on the default Laravel email verification email sent.
The emails manually sent out with Laravel's Mailable get the wrong format for the raw_body.
There's a breaking change made in version 1.4.8. For the new e-mail "raw_body" was not saved into DB but stored on filesystem. The "raw_body" contains the file path and not the original raw content.
You can try to replace the line 86 into src/Models/Email.php with:
if (!Storage::disk($storageDisk)->exists($record->raw_body)) {
If working we can fix the codebase and made a new release.
There's a breaking change made in version 1.4.8. For the new e-mail "raw_body" was not saved into DB but stored on filesystem. The "raw_body" contains the file path and not the original raw content.
You can try to replace the line 86 into src/Models/Email.php with:
if (!Storage::disk($storageDisk)->exists($record->raw_body)) {
If working we can fix the codebase and made a new release.
Sorry, you can try a more polish way to check if "raw_body" field is a valid path.
Replace line 85 at src/Models/Email.php with:
if (! empty($record->raw_body) && count(explode(DIRECTORY_SEPARATOR, $record->raw_body)) === 3) {
Alright changes done. Should I temporarily set 'prune_crontab' => '* * * * *'
in the config file to check if it works?
Alright changes done. Should I temporarily set
'prune_crontab' => '* * * * *'
in the config file to check if it works?
If you have access to server console you can run directly this command:
php artisan model:prune --model=Email
Perfect, this seems to have solved the issue:
if (! empty($record->raw_body) && count(explode(DIRECTORY_SEPARATOR, $record->raw_body)) === 3) {
Thank you for the help!
What happened?
I get the error
Corrupted path detected
every day at midnight.The package runs the cron to prune emails older than 60 days, every day at midnight. I recently upgraded to v1.4.8, run the migrations, and from the next midnight every day I get this error.
I can see the first email in the database is exactly 60 days before the date I run the migrations.
The actual log looks like this (without the actual email addresses):
Here is the stacktrace:
How to reproduce the bug
After upgrading to v1.4.8 and running migrations, the issue appeared with emails logged with version v1.2.2
Package Version
1.4.8
PHP Version
8.3
Laravel Version
11.16.0
Which operating systems does with happen with?
Linux
Notes
No response