Project

General

Profile

Actions

Bug #30643

closed

Fatal Error in Workspaces preview

Added by Steffen Gebert over 12 years ago. Updated over 6 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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Steffen Gebert over 12 years ago

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

Actions #2

Updated by Tolleiv Nietsch over 12 years ago

  • Status changed from New to Needs Feedback

Hm maybe a plugin which influences the BE_USER ?

Actions #3

Updated by Steffen Gebert over 12 years ago

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

Actions #4

Updated by Stefan Neufeind over 12 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.

Actions #5

Updated by Steffen Gebert over 12 years ago

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

Actions #6

Updated by Stefan Neufeind over 12 years ago

  • Status changed from Needs Feedback to Closed
Actions #7

Updated by Christian Lerrahn about 12 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.

Actions #8

Updated by Juergen Kussmann almost 12 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 :-(

Actions #9

Updated by Luc Muller over 11 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.

Actions #10

Updated by Christian Lerrahn over 11 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.

Actions #11

Updated by Urs Braem over 11 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

Actions #12

Updated by Michael Stucki over 10 years ago

  • Category changed from Bugs to Workspaces
Actions #13

Updated by Michael Stucki over 10 years ago

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

Updated by Peter Niederlag about 10 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
Actions #15

Updated by Gerrit Code Review about 10 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

Actions #16

Updated by Thomas Sperling about 10 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?

Actions #17

Updated by Gerrit Code Review about 10 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

Actions #18

Updated by Gerrit Code Review over 9 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

Actions #19

Updated by Gerrit Code Review over 9 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

Actions #20

Updated by Mathias Schreiber about 9 years ago

  • Target version set to 7.5
Actions #21

Updated by Gerrit Code Review almost 9 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

Actions #22

Updated by Peter Niederlag almost 9 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF