Bug #30643

Fatal Error in Workspaces preview

Added by Steffen Gebert almost 10 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
Start date:
2011-10-07
Due date:
% Done:

100%

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

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

Related to TYPO3 Core - Task #67224: Restructure list of conditions of #30643Closed2015-06-01

Actions
#1

Updated by Steffen Gebert almost 10 years ago

P.S: I get this error in the right/bottom frame of the WS preview.

#2

Updated by Tolleiv Nietsch almost 10 years ago

  • Status changed from New to Needs Feedback

Hm maybe a plugin which influences the BE_USER ?

#3

Updated by Steffen Gebert almost 10 years ago

Well.. looks like it's now working. Dunno what was wrong.

#4

Updated by Stefan Neufeind almost 10 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 almost 10 years ago

I guess it can be closed. It did not occur anymore..

#6

Updated by Stefan Neufeind almost 10 years ago

  • Status changed from Needs Feedback to Closed
#7

Updated by Christian Lerrahn over 9 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 over 9 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 about 9 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 almost 9 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 almost 9 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 almost 8 years ago

  • Category changed from Bugs to Workspaces
#13

Updated by Michael Stucki almost 8 years ago

  • Project changed from 624 to TYPO3 Core
  • Category changed from Workspaces to Workspaces
#14

Updated by Peter Niederlag over 7 years 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
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
#15

Updated by Gerrit Code Review over 7 years 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 7 years 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 7 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/27834

#18

Updated by Gerrit Code Review about 7 years 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 almost 7 years 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 over 6 years ago

  • Target version set to 7.5
#21

Updated by Gerrit Code Review over 6 years 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 over 6 years ago

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

Updated by Riccardo De Contardi almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF