TypeError: t.TYPO3.settings is undefined in popup of feedit
When using feedit https://github.com/FriendsOfTYPO3/feedit with current TYPO3 master, and one edits a content element in frontend, a popup with url
This shows the backend edit form of the content element.
The loading animation does not stop, and browser console shows:
TypeError: t.TYPO3.settings is undefined ContextHelp.js:33 initialize ContextHelp.js:33 i ContextHelp.js:26 <anonymous> ContextHelp.js:96 execCb require.js:5 check require.js:5 enable require.js:5 bind require.js:5 emit require.js:5 each require.js:5 emit require.js:5 check require.js:5 enable require.js:5 bind require.js:5 emit require.js:5 each require.js:5 emit require.js:5 check require.js:5 enable require.js:5 init require.js:5 O require.js:5 completeLoad require.js:5 onScriptLoad require.js:5
Reproducable with Firefox "75.0 (64-bit)" on Ubuntu 20.04 LTS.
I don't see any change to the ContextHelp.ts file which broke the behaviour, maybe something else is involved?
Updated by Oliver Hader about 1 year ago
- https://github.com/TYPO3/TYPO3.CMS/blob/master/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ContextHelp.ts#L40-L46 is retrieving the corresponding
I guess (did not test that) that the frontend
window object is used which does not have required
Updated by Daniel Siepmann about 1 year ago
I just found out that the following workflow works (most of the time):
- Open TYPO3 Backend
- Login to Backend
- Open Preview of a site via TYPO3 Backend (preview button)
- Start editing page content via feedit.
Note: Feedit opens a new tab in my Firefox browser. No PopUp or new Window.
Sometimes it is possible to close the new tab, and open another one via feedit. Sometimes it will not work, and above issue is raised.
Retrying (closing new tab and clicking button again) solves the problem from time to time.
I would have tested with chromium, but for some reason login to TYPO3 Backend does not work within Chromium, but only with this instance.
I've also noticed everything works fine and expected when using incognito mode. But I don't know the cause.
Also the whole installation feels faster in incognito mode. Even disabling all installed extensions doesn't make a difference, only switching to incognito mode.
I would be fine with closing the issue, if you don't have further ideas. Sounds like an edge case with the setup and browser.
Updated by Kurt Dirnbauer 12 months ago
same problem here with mac and chrome.
console log in new tab:
Uncaught TypeError: Cannot read property 'ContextHelp' of undefined at initialize (ContextHelp.js?bust=19a39e5c7ad3e5a3a9f468e58ff258ff4d7ef77c:13) at new i (ContextHelp.js?bust=19a39e5c7ad3e5a3a9f468e58ff258ff4d7ef77c:13) at Object.<anonymous> (ContextHelp.js?bust=19a39e5c7ad3e5a3a9f468e58ff258ff4d7ef77c:13) at Object.execCb (require-96bd1f40631d3c0d0c3bbb53eef6ac72.js:5) at i.check (require-96bd1f40631d3c0d0c3bbb53eef6ac72.js:5) at i.<anonymous> (require-96bd1f40631d3c0d0c3bbb53eef6ac72.js:5) at require-96bd1f40631d3c0d0c3bbb53eef6ac72.js:5 at require-96bd1f40631d3c0d0c3bbb53eef6ac72.js:5 at each (require-96bd1f40631d3c0d0c3bbb53eef6ac72.js:5) at i.emit (require-96bd1f40631d3c0d0c3bbb53eef6ac72.js:5)
Updated by Daniel Siepmann 10 months ago
Looks like the technical problem is the following. The JS files don't know any context except TYPO3 backend.
They also expect to be called within a popup opened from the backend.
Therefore they contain small logic to get the TYPO3 context from possible opener window and their top frame.
Poorly this doesn't work when being opened from frontend context, as the JS TYPO3 backend context does not exist. One could now go ahead and try to adjust all those files fetching the context. One could extend them to check one more opener. That way they would be able to work if the frontend was opened via "view" from TYPO3 backend.
Still that won't be a proper solution.
I'm not a JS pro and don't know whether there is any way to provide the context.