?
avatar sandewt
sandewt
11 May 2021

I suggest compiling a list of disused images so that they can be removed.

Expected result

The images no longer used in Joomla 4.0 have been removed.

Actual result

The joomla\media\system\images directory contains images that are no longer in use.
Such as:

  • rating_star.png
  • rating_star_blank.png
avatar sandewt sandewt - open - 11 May 2021
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 May 2021
avatar sandewt sandewt - change - 11 May 2021
The description was changed
avatar sandewt sandewt - edited - 11 May 2021
avatar richard67
richard67 - comment - 11 May 2021

We should keep in mind that we have 2 possible steps:

  1. Remove images from sources so they are not included into the installation and update packages, but keeping them on update, i.e. not delete them.
  2. Add the old images to the list of files (and if at the end an empty folder remains, add that to the list of folders) in script.php to be deleted on update.

For the old sample data images we decided not to delete them on updates, see #32744 . Such cases need to be added to the exclusion list in the too which we use to create the list of deleted files and folders for script.php, current development of that tool see here: #25559 .

So if you create a PR to remove images from the sources, it should be discussed which of them we don't want to delete on updates because they might be used in content or by 3rd party, and the result should be a 2nd list of those which we want to keep on updates.

avatar sandewt
sandewt - comment - 11 May 2021

@richard67

If I understand you correctly, there should be a list of old images that we want to keep.
And a second list with the images that we want to delete permanently, and name them in the file ... \administrator\components\ com_admin\script.php.

avatar richard67
richard67 - comment - 11 May 2021

@sandewt No. It needs only a list of those which we want to keep on update even if they have been deleted from the sources.

This list will be added to the list of files to be kept on update in script deleted_file_check.php from PR #25559 . If this script compares now e.g. a future 4.0-dev package where the images have been removed from the sources e.g. with Beta 7, it will see that the images have been removed, but because they are in the list of files to be kept, the tool will not add them to the list of files to be deleted, which later is used in script.php.

The administrator\components\com_admin\script.php should not be edited manually by someone for that purpose, it's currently me or @wilsonge keeping it up to date with the mentioned tool.

So you make a PR which removes the files from the sources, and in the PR description you name those which shall be kept on update, and you notify me, and then I will care for updating our tool accordingly by that list.

avatar sandewt
sandewt - comment - 11 May 2021

@richard67. I assume this is the list (deleted_files.txt) to be kept on update, which should be made. Apparently no start has been made yet ?

file_put_contents(__DIR__ . '/deleted_files.txt', implode("\n", $deletedFiles));

avatar brianteeman
brianteeman - comment - 11 May 2021

No. Read a few lines above and you will see how the contents of that file are generated

avatar richard67
richard67 - comment - 11 May 2021

@richard67. I assume this is the list (deleted_files.txt) to be kept on update, which should be made. Apparently no start has been made yet ?

@sandewt No, this is the list generated by the tool, and you have to check the tool in George's draft PR, not the one you linked to. The list of files to be kept on update is maintained here: https://github.com/wilsonge/joomla-cms/blob/deleted_file_rework/build/deleted_file_check.php#L153-L154

I have already explained all above, just read it.

avatar sandewt
sandewt - comment - 11 May 2021

No. Read a few lines above and you will see how the contents of that file are generated

I have already explained all above, just read it.

I see....

avatar chmst chmst - change - 28 Jul 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-07-28 18:12:22
Closed_By chmst
avatar chmst chmst - close - 28 Jul 2021
avatar chmst
chmst - comment - 28 Jul 2021

These files will be removed here: #34962. please test

Add a Comment

Login with GitHub to post a comment