Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Proposal to remove old disused images #33768

Closed
sandewt opened this issue May 11, 2021 · 8 comments
Closed

[4.0] Proposal to remove old disused images #33768

sandewt opened this issue May 11, 2021 · 8 comments

Comments

@sandewt
Copy link
Contributor

sandewt commented May 11, 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
@richard67
Copy link
Member

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.

@sandewt
Copy link
Contributor Author

sandewt commented May 11, 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.

@richard67
Copy link
Member

@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.

@sandewt
Copy link
Contributor Author

sandewt commented May 11, 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));

@brianteeman
Copy link
Contributor

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

@richard67
Copy link
Member

@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.

@sandewt
Copy link
Contributor Author

sandewt commented May 11, 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....

@chmst
Copy link
Contributor

chmst commented Jul 28, 2021

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

@chmst chmst closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants