You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used an image field as translated field, when i edited a content and press save, it gave me: League\Flysystem\Filesystem::delete(): Argument #1 ($location) must be of type string, null given, called in ...\vendor\laravel\framework\src\Illuminate\Filesystem\FilesystemAdapter.php on line 518
What I've already tried to fix it
I changed vendor/backpack/crud/src/app/Library/Uploaders/Uploader.php file from:
public function getPreviousFiles(Model $entry): mixed
{
if (! $this->attachedToFakeField) {
return $entry->getOriginal($this->getName());
}
$value = $entry->getOriginal($this->attachedToFakeField);
$value = is_string($value) ? json_decode($value, true) : (array) $value;
return $value[$this->getName()] ?? null;
}
To
public function getPreviousFiles(Model $entry): mixed
{
if (! $this->attachedToFakeField) {
return $entry->getAttributeValue($this->getName());
}
$value = $entry->getAttributeValue($this->attachedToFakeField);
$value = is_string($value) ? json_decode($value, true) : (array) $value;
return $value[$this->getName()] ?? null;
}
Is it a bug in the latest version of Backpack?
Yes
After I run composer update backpack/crud the bug... is it still there?
Yes
Backpack, Laravel, PHP, DB version
When I run php artisan backpack:version the output is:
PHP VERSION:
PHP 8.2.5 (cli) (built: Apr 12 2023 08:43:43) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
Bug report
What I did
I used an image field as translated field, when i edited a content and press save, it gave me:
League\Flysystem\Filesystem::delete(): Argument #1 ($location) must be of type string, null given, called in ...\vendor\laravel\framework\src\Illuminate\Filesystem\FilesystemAdapter.php on line 518
What I've already tried to fix it
I changed vendor/backpack/crud/src/app/Library/Uploaders/Uploader.php file from:
To
Is it a bug in the latest version of Backpack?
Yes
After I run
composer update backpack/crud
the bug... is it still there?Yes
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:PHP VERSION:
PHP 8.2.5 (cli) (built: Apr 12 2023 08:43:43) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
LARAVEL VERSION:
10.16.1.0
BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.0.2
backpack/crud: 6.0.7
backpack/filemanager: 3.0.2
backpack/generators: v4.0.2
backpack/logmanager: v5.0.0
backpack/permissionmanager: 7.0.0
backpack/pro: 2.0.9
backpack/revise-operation: 2.0.0
backpack/settings: 3.1.0
backpack/theme-coreuiv2: 1.1.4
The text was updated successfully, but these errors were encountered: