When trying to move images I get this error:
The file C:\laragon\www\xxxxxxxx\images\009-23655-25-850-270-5-Thumbnail.png could not be moved to unused/C:\laragon\www\xxxxxxxxx\images\009-23655-25-850-270-5-Thumbnail.png
It would be also nice to have it looking in the pages_description table -> pages_text, advert images, manufacturer description and importers description.
Image Cleaner
wrong path in local installation - Image Cleaner
wrong path in local installation
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Contact:
Re: wrong path in local installation
O.K. I got it to work under windows adding a check for path separator:
In: includes\apps\imageCleaner\imageCleaner.php line 45 forward changed to:
and replacing backslash path separator:
In: admin\includes\actions\image_cleaner\move_files.php line 27 added:
Still missing to iterate through the directories if the image is in a deeper level than one subdirectory in images/
In: includes\apps\imageCleaner\imageCleaner.php line 45 forward changed to:
Code: Select all
if ($add == 0) {
if (DIRECTORY_SEPARATOR === '\\') {
$image_path = str_replace('/', '\\', DIR_FS_CATALOG . 'images/');
} else {
$image_path = DIR_FS_CATALOG . 'images/';
}
$details[] = str_replace($image_path, '', $fileinfo->getRealPath());
}
In: admin\includes\actions\image_cleaner\move_files.php line 27 added:
Code: Select all
if (DIRECTORY_SEPARATOR === '\\') {
$unused_image = str_replace('\\', '/', $unused_image);
}
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Contact:
Re: wrong path in local installation
Thank you.
Addon updated with changes.
Will add other searches in next iteration.
Addon updated with changes.
Will add other searches in next iteration.
Check out my addons - app.php/addons/author/frankl/contributions
-
frankl
- Builder
- Posts: 159
- Joined: Tue Feb 23, 2021 8:39 pm
- Phoenix Version: v1.1.0.4
- Contact:
Re: wrong path in local installation
The update to:
is wrong. DIR_FS_CATALOG includes already the DIR_WS_CATALOG directory.
Code: Select all
DIR_FS_CATALOG . DIR_WS_CATALOG . 'images/'Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Contact:
Re: wrong path in local installation
To avoid duplicated work, I post my modified version:
- checks for categories, importers and adverts images and in pages, manufacturers and importers description.
- added functionality to save the exception list in a hidden configuration entry and modified the labels according to my changes.
- fixed wrong paths and tested under local windows and public server installation.
- checks for categories, importers and adverts images and in pages, manufacturers and importers description.
- added functionality to save the exception list in a hidden configuration entry and modified the labels according to my changes.
- fixed wrong paths and tested under local windows and public server installation.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Contact:
Re: wrong path in local installation
Awesome, thank you so much Rainer!
Check out my addons - app.php/addons/author/frankl/contributions
-
frankl
- Builder
- Posts: 159
- Joined: Tue Feb 23, 2021 8:39 pm
- Phoenix Version: v1.1.0.4
- Contact: