Bug #97655
closedBookmark for new records not working properly
100%
Description
I tested this with sys_categories, ext:news and tt_content. When opening a new record and saving the current view in a bookmark, it's not working properly. There is a new entry in sys_be_shortcut with my bookmark data, but it's not visible in the bookmark toolbar.
In some cases it seems to work, but actually it doesn't (see below).
I debugged a litte bit and I guess I found the issue in \TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository->initShortcuts()
For new records the type is set to "new" instead of "edit". But the the page ID of the record is stored in "recordid". On line 532 the script checks if a record with this uid exists, returns null and the bookmark is skipped. So it mistakes the storage pid for the uid.
It works when:
There is an existing record e.g. a sys_category with uid 7 and a new bookmark for a sys_category record is created on page 7. Then it uses the pid "7" to find a record of that table with uid 7. => bookmark is visible
It doesn't work when:
The new sys_category record is on page with uid "10" but there is no sys_category record with uid "10" in the system.
It's confusing, but I hope this helps.
TYPO3 11.5.10
PHP 8.0
Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74691
Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74691
Updated by Oliver Bartsch over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 79809796aa75e58a13880124354204489cb1767d.
Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74741
Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74741
Updated by Oliver Bartsch over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset d2e31772c87184881e21527cd44ce6495fedcdb7.