Bug #30643
closed
Fatal Error in Workspaces preview
Added by Steffen Gebert about 13 years ago.
Updated about 7 years ago.
Description
When opening the horizontal/vertical WS previews, I get the following error:
Fatal error: Call to a member function getSessionData() on a non-object in
typo3/sysext/workspaces/Classes/Service/Fehooks.php on line 50
Call Stack
# Time Memory Function Location
1 0.0001 642312 {main}( ) ../profile.php:0
2 0.0050 905464 require( '/opt/local/www/master/typo3_src/index.php' ) ../profile.php:4
3 0.0064 1108056 require( '/opt/local/www/master/typo3_src/typo3/sysext/cms/tslib/index_ts.php' ) ../index.php:78
4 1.3018 25442840 tslib_fe->hook_eofe( ) ../index_ts.php:500
5 1.3018 25444312 t3lib_div::callUserFunction( ) ../class.tslib_fe.php:3818
6 1.3023 25458696 call_user_func_array ( ) ../class.t3lib_div.php:4677
7 1.3023 25458840 Tx_Workspaces_Service_Fehooks->hook_eofe( ) ../class.t3lib_div.php:4677
The line causing this error is
$GLOBALS['BE_USER']->getSessionData('workspaces.backend_domain')
I am still logged in in the backend. The slider works. Working on master with Introduction Package.
P.S: I get this error in the right/bottom frame of the WS preview.
- Status changed from New to Needs Feedback
Hm maybe a plugin which influences the BE_USER ?
Well.. looks like it's now working. Dunno what was wrong.
Steffen, any idea what might have gone wrong or what we could take a look at? Otherwise I'd suggest to close this bug.
I guess it can be closed. It did not occur anymore..
- Status changed from Needs Feedback to Closed
I'd like to re-open this because I got the same(?) error in 4.5.11.
While I cannot reproduce the problem on another site, here is what I have to do to reproduce it on the site where it occurred.
1. Log in to an account which only has access to a draft workspace.
2. Change the title of a shortcut page.
3. Preview the page.
The line
Fatal error: Call to a member function getSessionData() on a non-object in /foo/bar/typo3_src-4.5.11/typo3/sysext/workspaces/Classes/Service/Fehooks.php on line 44
will appear instead of the draft preview on any visual preview (slider or splits).
I'm not sure which one of the details above play a role. The site also uses CoolURI which I wouldn't expect to play a role.
Christian Lerrahn wrote:
I'd like to re-open this because I got the same(?) error in 4.5.11.
I also got this error-message in my PHP-logfile in 4.5.14. But i can't reproduce it :-(
Hi Guys
Anyone has a hint on this problem ?
I got the same problem using 4.5.11
By my side it occurs when I try to preview a tt_news record in workspace.
Here are some hint on my configuration.
Got a Workspace that give the user only access to a sysfolder "Articles". and a tt_news single page to preview articles
Got tt_news preview properly configured (tx_ttnews.singlePid = 13 ) in TSConfig
The user edit some article and then click save and preview.
Thus resulting in the php error declared above.
I'm thinking of an access problem to something but don't know where to look at... everything seems to be properly configured.
I have encountered this problem again on 4.5.19. The object $GLOBALS['BE_USER'] is NULL if the backend user is currently set to preview. If you switch to live workspace in the backend, so can preview the drft workspace without any issue.
I have a very similar issue in TYPO3 6.0.0
Fatal error: Call to a member function getSessionData() on a non-object in /home/xxx/public_html/gov/typo3_src-6.0.0/typo3/sysext/workspaces/Classes/Hook/TypoScriptFrontendControllerHook.php on line 49
I am viewing as admin user.
No difference if I'm in the live or draft workspace
EDIT: I'm using the government package as downloaded from typo3.org, out of the box
- Category changed from Bugs to Workspaces
- Project changed from 624 to TYPO3 Core
- Category changed from Workspaces to Workspaces
This problem is only uncovered when the user has clicked the link that is generated by "generate workspace preview link".
TYPO3\CMS\Workspaces\Controller/PreviewController
- PreviewController adds &ADMCMD_noBeUser=1 to the url to be called for the live version
- index_ts.php unsets $GLOBALS['BE_USER'] when seeing ADMCMD_noBeUser=1
Calling the "generate workspace preview link"
- the preview link has ADMCMD_prev=#HASH#
- TYPO3\CMS\Version\Hook\PreviewHook checks for ADMCMD_prev and sets a cookie that effectivly makes the workspace preview persistent for the session
Regular Frontend url's now have (persistent) workspace preview enabled
- TSFE->fePreview=2 is set
- TYPO3\CMS\Workspaces\Hook\TypoScriptFrontendControllerHook pops in due to TSFE->fePreview=2 and tries to access $GLOBALS['BE_USER']
- fatal error
- Status changed from Closed to Under Review
I get a similiar error, but in typo3/sysext/workspaces/Classes/Hook/TypoScriptFrontendControllerHook.php on line 49.
This patch doesn't solve it for me. I think the Problem is that in the IFrame document.domain is not set. Is this problem related or is it a different problem?
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27834
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27834
- Target version set to 7.5
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39860
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF