Bug #30643
Fatal Error in Workspaces preview
Status: | Resolved | Start date: | 2011-10-07 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Workspaces | Spent time: | - | |
Target version: | 7.5 | |||
TYPO3 Version: | 4.6 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: |
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.
Related issues
Associated revisions
[BUGFIX] dont set fePreview=2 with ADMCMD_noBeUser
The workspace preview adds the GET parameter ADMCMD_noBeUser
when requesting the frame for live preview.
$GLOBALS[BE_USER] is unset in index_ts.php when seeing ADMCMD_noBeUser.
In TypoScriptFrontendController fePreview=2 must not be set when
ADMCMD_noBeUser parameter is present to prevent fatal errors on
calling methods on a non-existent $GLOBALS[BE_USER]
Releases: master, 6.2
Resolves: #30643
Change-Id: Idff7febcaaa8b87bd65a993b1860ad378e09b22f
Reviewed-on: http://review.typo3.org/27834
Reviewed-by: Lorenz Ulrich <lorenz.ulrich@visol.ch>
Tested-by: Lorenz Ulrich <lorenz.ulrich@visol.ch>
Reviewed-by: Markus Bucher <markusbucher@gmx.de>
Tested-by: Markus Bucher <markusbucher@gmx.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
[BUGFIX] dont set fePreview=2 with ADMCMD_noBeUser
The workspace preview adds the GET parameter ADMCMD_noBeUser
when requesting the frame for live preview.
$GLOBALS[BE_USER] is unset in index_ts.php when seeing ADMCMD_noBeUser.
In TypoScriptFrontendController fePreview=2 must not be set when
ADMCMD_noBeUser parameter is present to prevent fatal errors on
calling methods on a non-existent $GLOBALS[BE_USER]
Releases: master, 6.2
Resolves: #30643
Change-Id: Idff7febcaaa8b87bd65a993b1860ad378e09b22f
Reviewed-on: http://review.typo3.org/39860
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
History
#1 Updated by Steffen Gebert almost 4 years ago
P.S: I get this error in the right/bottom frame of the WS preview.
#2 Updated by Tolleiv Nietsch almost 4 years ago
- Status changed from New to Needs Feedback
Hm maybe a plugin which influences the BE_USER ?
#3 Updated by Steffen Gebert almost 4 years ago
Well.. looks like it's now working. Dunno what was wrong.
#4 Updated by Stefan Neufeind over 3 years ago
Steffen, any idea what might have gone wrong or what we could take a look at? Otherwise I'd suggest to close this bug.
#5 Updated by Steffen Gebert over 3 years ago
I guess it can be closed. It did not occur anymore..
#6 Updated by Stefan Neufeind over 3 years ago
- Status changed from Needs Feedback to Closed
#7 Updated by Christian Lerrahn over 3 years ago
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.
#8 Updated by Juergen Kussmann about 3 years ago
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 :-(
#9 Updated by Luc Muller almost 3 years ago
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.
#10 Updated by Christian Lerrahn over 2 years ago
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.
#11 Updated by Urs Braem over 2 years ago
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
#12 Updated by Michael Stucki over 1 year ago
- Category changed from Bugs to Workspaces
#13 Updated by Michael Stucki over 1 year ago
- Project changed from Workspaces & Versioning to Core
- Category changed from Workspaces to Workspaces
#14 Updated by Peter Niederlag over 1 year ago
- Is Regression set to No
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
- 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
#15 Updated by Gerrit Code Review over 1 year ago
- Status changed from Closed to Under Review
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/27834
#16 Updated by Thomas Sperling over 1 year ago
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?
#17 Updated by Gerrit Code Review over 1 year 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/27834
#18 Updated by Gerrit Code Review 11 months ago
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
#19 Updated by Gerrit Code Review 10 months ago
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
#20 Updated by Mathias Schreiber 6 months ago
- Target version set to 7.5
#21 Updated by Gerrit Code Review 2 months ago
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
#22 Updated by Peter Niederlag 2 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset fc3a6e70da09d8113101dff5091c7a2875c8aa9b.