Project

General

Profile

Actions

Bug #70074

closed

After saving tt_content, always jumps to top

Added by Michael Fritz over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2015-09-24
Due date:
% Done:

50%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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


Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Feature #72908: Backend: Repositioning the page after a button is usedClosed2016-01-24

Actions
Related to TYPO3 Core - Feature #75462: Retain scroll position after deleting/hiding a content elementNew2016-04-08

Actions
Related to TYPO3 Core - Bug #80273: Return to content element after closing for links of bodytextClosedGeorg Ringer2017-03-14

Actions
Related to TYPO3 Core - Bug #80274: Return to content element after closing for hide/unhide linksClosedGeorg Ringer2017-03-14

Actions
Actions #1

Updated by Michael Fritz over 8 years ago

Actually it takes a lot of time for editors to scroll to the part again, where they edited the last time..

Actions #2

Updated by Rafal Brzeski over 8 years ago

best solution would be an ajax request, but this is I think an epic issue for future release :)

Actions #3

Updated by Benjamin Robinson over 8 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.

Actions #4

Updated by Michael Fritz about 8 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..

Actions #5

Updated by Christoph Bessei about 8 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.

Actions #6

Updated by KJ Kooistra almost 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.

Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Gerrit Code Review almost 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

Actions #10

Updated by Gerrit Code Review almost 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

Actions #11

Updated by Anonymous almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by S. G. about 7 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

Actions #13

Updated by S. G. about 7 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

Actions #14

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF