Bug #70074
closedAfter saving tt_content, always jumps to top
50%
Description
IS: When I save a tt_content element and close it, the viewport always jumps to the top of the page in the backend.
SHOULD: It should jump to the element I just edited or created.
This is the same for save and view tt_content, it could use the anchor like #c9182 to jump to the element in the frontend side.
This would make it easier to edit and check content in the backend..
However I have the feeling this feature was there in the past but vanished in 6.2...
Updated by Michael Fritz over 9 years ago
Actually it takes a lot of time for editors to scroll to the part again, where they edited the last time..
Updated by Rafal Brzeski about 9 years ago
best solution would be an ajax request, but this is I think an epic issue for future release :)
Updated by Benjamin Robinson about 9 years ago
It works if i open the element via pencil. If i open it by clicking on the text, it does not scroll down.
Updated by Michael Fritz almost 9 years ago
?Ajax-Request?
Best solution would be to add an achor to the preview link for instance:
website.de/?id=123#Anchor1
Then all I had to do is add anchors to all my tt_content elements, which I do anyways..
And I remember it worked some years ago..
Updated by Christoph Bessei almost 9 years ago
It would be really nice if this could be fixed/implemented.
As Michael said it would save the editors a lot of time.
Updated by KJ Kooistra over 8 years ago
I've seen this work just fine in 6.2. Are you using gridelements by any chance? Because it doesn't work with nested gridelements: https://forge.typo3.org/issues/73093
It doesn't work anymore in TYPO3 7.6 though. I got it fixed by updating TYPO3\CMS\Backend\View\PageLayoutView::tt_content_drawHeader() and changing line 1399 to:'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI') . '#element-tt_content-' . $row['uid']
However I'm not sure if this is a good way to fix it.
Updated by Gerrit Code Review over 8 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49123
Updated by Gerrit Code Review over 8 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49145
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49145
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49123
Updated by Anonymous over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset baabff7a433756562d171019beb49ff8ba533ef4.
Updated by S. G. almost 8 years ago
- % Done changed from 100 to 50
- TYPO3 Version changed from 6.2 to 7
- PHP Version changed from 5.6 to 7.1
Hi,
in the same id, I add the same param in the function linkEditContent (line 1895 for typo3 7.6.16)
public function linkEditContent($str, $row)
[...]
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI') . '#element-tt_content-' . $row['uid']
[...]
}
Without that the right callback url is written only on header and not when we click on the bodytext.
Thanks for including
Updated by S. G. almost 8 years ago
as well on hidding and unhidding (line: 1399 for typo3 7.6.16) :
public function tt_content_drawHeader($row, $space = 0, $disableMoveAndNewButtons = false, $langMode = false, $dragDropEnabled = false) { [...] if ($hiddenField && $GLOBALS['TCA']['tt_content']['columns'][$hiddenField] && (!$GLOBALS['TCA']['tt_content']['columns'][$hiddenField]['exclude'] || $this->getBackendUser()->check('non_exclude_fields', 'tt_content:' . $hiddenField)) ) { if ($row[$hiddenField]) { $value = 0; $label = 'unHide'; } else { $value = 1; $label = 'hide'; } $params = '&data[tt_content][' . ($row['_ORIG_uid'] ? $row['_ORIG_uid'] : $row['uid']) . '][' . $hiddenField . ']=' . $value; $out .= '<a class="btn btn-default" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction($params)) /* ADD THIS LINE */ . '#element-tt_content-' . $row['uid'] . '" title="' . $this->getLanguageService()->getLL($label, true) . '">' . $this->iconFactory->getIcon('actions-edit-' . strtolower($label), Icon::SIZE_SMALL)->render() . '</a>'; } [...] }
thanks