User tests: Successful: Unsuccessful:
Pull Request resolves an issue I discovered today, when trying to understand who deleted a folder .
Deleting a file via the Media Manager wrote an action log entry with an empty title because ApiModel delete() never set the name property on the object passed to the onContentBeforeDelete/onContentAfterDelete events. Deleting a folder (with its contents) logged nothing at all because com_media.folder was never registered in action_log_config.
Name of the Deleted File is now in the user action log
Folders are logged now too (have not been logged before)
Install the prebuild package and enable user action log if not activated yet
Delete a file and check the user action log if the filename is mentioned
Delete a folder and check if the folder is mentioned.
User action log logs that something was deleted but not what
User action log did not log folder deletetions
User action log logs which file was deleted
User action log logs folder deletetions and name
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | SQL Administration com_admin Postgresql com_media Language & Strings Installation |
| Title |
|
||||||
I have tested this item ✅ successfully on 9081c2b
The name of a deleted file is in the log, and folder deletions are logged.
Media Manager, User Actions Log:
| Action | Before | With PR |
|---|---|---|
| Delete a file | "User admin deleted the media" (empty title) | ✅ "User admin deleted the media ui-file.png" |
| Delete a file in a subfolder | empty title | ✅ "… deleted the media deep.png" |
| Delete an empty folder | no entry | ✅ "User admin deleted the media folder empty-folder" |
| Delete a folder with a file and a subfolder | no entry | ✅ "User admin deleted the media folder after-folder" (one entry) |
| Create a folder | no entry | "User admin added new media folder after-folder" |
| Create / upload a file | logged with name | ✅ unchanged |
File and folder deleted once through the Media Manager toolbar and once through the same request sent directly; same entries.
Also checked:
media_folder / com_media.folder is there.PLG_ACTIONLOG_JOOMLA_TYPE_MEDIA_FOLDER resolves in the log ("media folder").phpcs and php -l on ApiModel.php: clean.createFolder() already sends the com_media.folder event. That fits, but the description only mentions deletions.deep.png deleted from after-folder/sub is logged as "deep.png". The "added" entries link to the folder, the "deleted" ones have no path at all. Could be a follow-up.shouldnt it log the path and not just the filename - you might have a file with the same name in multiple folders and for a log to be useful you should know which of those files was deleted
| Labels |
Added:
Language Change
PR-6.3-dev
|
||
@tecpromotion @brianteeman I added the path :)
thanks
I have tested this item 🔴 unsuccessfully on 4f85116
I tested this unsuccessfully sadly.
While the Latest Actions log does indeed now log the file name :D, it did NOT log the folder deletion step (I deleted 2 different folders: test and headers (after deleing all of the images in the headers folder as shown below)).
Latest Actions
Action Date
User exlemor performed a check in to table #__modules Less than a minute ago.
User exlemor deleted the media /headers/blue-flower.jpg Less than a minute ago.
User exlemor deleted the media /headers/maple.jpg One minute ago.
User exlemor deleted the media /headers/walden-pond.jpg One minute ago.
User exlemor deleted the media /headers/raindrops.jpg One minute ago.
I have tested this item 🔴 unsuccessfully on 4f85116
I tested this unsuccessfully sadly.
While the Latest Actions log does indeed now log the file name :D, it did NOT log the folder deletion step (I deleted 2 different folders: test and headers (after deleing all of the images in the headers folder as shown below)).
Latest Actions
Action Date
User exlemor performed a check in to table #__modules Less than a minute ago.
User exlemor deleted the media /headers/blue-flower.jpg Less than a minute ago.
User exlemor deleted the media /headers/maple.jpg One minute ago.
User exlemor deleted the media /headers/walden-pond.jpg One minute ago.
User exlemor deleted the media /headers/raindrops.jpg One minute ago.
I have tested this item 🔴 unsuccessfully on 4f85116
I tested this unsuccessfully sadly.
While the Latest Actions log does indeed now log the file name :D, it did NOT log the folder deletion step (I deleted 2 different folders: test and headers (after deleing all of the images in the headers folder as shown below) but no entry showing between performed a check and deleted the media where I placed the xxxx ).
Latest Actions
Action Date
User exlemor performed a check in to table #__modules Less than a minute ago.
xxxx
User exlemor deleted the media /headers/blue-flower.jpg Less than a minute ago.
User exlemor deleted the media /headers/maple.jpg One minute ago.
User exlemor deleted the media /headers/walden-pond.jpg One minute ago.
User exlemor deleted the media /headers/raindrops.jpg One minute ago.
| Title |
|
||||||
I have tested this item ✅ successfully on 9081c2b
The name of a deleted file is in the log, and folder deletions are logged.
Verification
Media Manager, User Actions Log:
File and folder deleted once through the Media Manager toolbar and once through the same request sent directly; same entries.
Also checked:
media_folder/com_media.folderis there.PLG_ACTIONLOG_JOOMLA_TYPE_MEDIA_FOLDERresolves in the log ("media folder").phpcsandphp -lonApiModel.php: clean.Notes
createFolder()already sends thecom_media.folderevent. That fits, but the description only mentions deletions.deep.pngdeleted fromafter-folder/subis logged as "deep.png". The "added" entries link to the folder, the "deleted" ones have no path at all. Could be a follow-up.This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48612.