Allow Backend URL to be specified for Admin Panel
This feature request is related to #86548
Imagine you have a multi-domain install:
You want (for whichever - good - reason) to force (or at least highly suggest) the webmasters to access the Backend through admin.example.com.
In order for Admin Panel to work, the trick is to force the FE/BE cookies like that (typically in
$GLOBALS['TYPO3_CONF_VARS']['BE']['cookieDomain'] = '.example.com'; $GLOBALS['TYPO3_CONF_VARS']['FE']['cookieDomain'] = '.example.com';
This will effectively allow the Admin Panel to show up whenever you are authenticated into the Backend (on admin.example.com) while browsing, say, domain1.example.com.
So far so good!
However then try to click on the admin panel button to edit the page:
The Backend will open up but using domain1.example.com/typo3 and not admin.example.com/admin (because there is no such configurable setting).
Note: the jump link is generated in
typo3/sysext/frontend/Classes/View/AdminPanelView.php around line 654 and generates an absolute link starting with a
/ (slash), thus effectively reusing the current domain. Trying to hardcode (to test) some scheme + domain at this place won't work since the security token will not be correct.
Updated by Xavier Perseguers over 2 years ago
I dug just a bit into my question which I documented on Forge. Basically and even for "much simpler" use cases, something that we lack currently is a way to open the Backend at some position. I explain :
- Open the Backend, visualize a page in Frontend, navigate away to another page if you want, when you click the "Open TYPO3 Backend" in admin panel, your backend tab is adapted to show you the page you were on when clicking. This is because
parent.openeris available in frontend (JS)
- => problem anyway: the Backend tab does not get the focus automatically
Now say you have a BE session, you manually open a FE, go to some page, click the Open TYPO3 Backend button. No
parent.opnener so you just get a new tab on the Backend, main page (you cannot "reuse" the existing tab and it's fine after all)
=> You get focus on the BE tab
=> you don't get the page selected in page tree
Ideally, what we should have is, regardless of those two use cases:
- Backend tab gets the focus
- Page Tree gets selected on the correct page
- => we should be able to specify an action in the URL which is not JS-based
- => this would automatically solve the case I have where admin BE is on another subdomain
Updated by Benni Mack over 1 year ago
yes. However, the main purpose of this button was (really --- way back then) that you have the "Interface Selector" in the BE login page, and then get redirected to the frontend directly with the admin panel available. If you want to do simple changes (via the old "feedit" extension) you do stuff there, but if you want to go back to BE, you click on that button.
In general, there is currently no way of identifying the current BE URL. I think we should somehow store this in the session so people could click on it - logged-in or not - and get to the backend that was used in the last BE session click. what do you think about that?