Bug #71950
closedsys_log doesn't show latest sys_history Entry if there are multiply with the same sys_log_uid
100%
Description
Due to the fact that sys_history Relation (via Icon) is done by transmitting the sh_uid which is retrieved by quering sys_history for sys_log_uid
and that is done by using the magic function findOneBySysLogUid or via direct query without any order by.
The icon might link to older records instead if sys_log has been truncated previously but not sys_history.
The easiest solution for now would be to query for the latest record in sys_history with the corresponding sys_log_uid.
It is realted to https://forge.typo3.org/issues/55298
However, where as #55298 proposes to decouple sys_history and sys_log (which is a good idea) for a first solution to 6.2 and 7.6
it would be good to just get the latest entry of the sys_log_uid in
\TYPO3\CMS\Backend\History\RecordHistory
and
\TYPO3\CMS\Belog\ViewHelpers\HistoryEntryViewHelper
so just ORDER BY tstamp DESC in RecordHistory and a corrsponding method for the HistoryEntryRepository which then will by called in HistoryEntryViewHelper.
Updated by Andreas Allacher almost 9 years ago
OK. My issue was mostly with the Icon in the sys log that goes to the wrong sys history but of course the issue in RecordHistory itself is even more problematic due to the query.
It could be solved for now by checking the latest sys_log_uid in sys_hsitory and using that prior to inserting into sys_log.
However, it would be better to just decouple them.
For now, however one could make the user id "optional" in RecordHistory by using a left join and current backend user id if there is none.
Of course, the icon from Sys Log Module to RecordHistory still would have to be fixed to latest.
That would have to be fixed in either case and should be relatively simple.
Updated by Andreas Allacher almost 9 years ago
Just to be sure this ticket mostly relates to the wrong Link in the sys log to the sys history which would still be an issue after solving #55298 and could actually be fixed now.
Updated by Gerrit Code Review about 7 years ago
- Status changed from New to Under Review
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Christian Kuhn about 7 years ago
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review about 7 years ago
Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 27 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Gerrit Code Review about 7 years ago
Patch set 28 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53195
Updated by Benni Mack about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d047b314162ad1683f116df762384ada8b9dd5f3.