[TYPO3-core] RF: Feature #13610: t3lib_BEfunc::viewOnClick - Hook request

François Suter fsu-lists at cobweb.ch
Mon Nov 15 17:54:42 CET 2010


Hi,

> 1) Install "workspaces"
> 2) Create a workspace and switch into that workspace
> 3) Disable Frontend preview
> 4) Click on any preview-icon -> you'll end up in the old split-screen
> 5) Apply the patch
> 4) Click on any preview-icon -> you'll end up in a new split-screen
> which consists of some ExtJS tabs.

After following all these steps I get a catchable fatal error exception 
in all Web modules while being on the versioned page that I want to 
view. The first time I was actually able to view it, but I got the old 
split view and the exception appeared in the "control" screen.

If I select "Enable fronted preview" the exception goes away.

I included the whole debug backtrace below, I hope it helps you track 
the problem.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch




Uncaught TYPO3 Exception
#1: PHP Catchable Fatal Error: Argument 1 passed to 
Tx_Extbase_Persistence_Mapper_DataMapFactory::injectReflectionService() 
must be an instance of Tx_Extbase_Reflection_Service, null given, called 
in 
/usr/local/src/typo3/TRUNK/typo3/sysext/extbase/Classes/Dispatcher.php 
on line 284 and defined in 
/usr/local/src/typo3/TRUNK/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapFactory.php 
line 45

t3lib_error_Exception thrown in file
/usr/local/src/typo3/TRUNK/t3lib/error/class.t3lib_error_errorhandler.php in 
line 106.

14 t3lib_error_ErrorHandler::handleError(4096, "Argument 1 passed to 
Tx_Extbase_Persistence_Mapper…ase/Classes/Dispatcher.php on line 284 and 
defined", 
"/usr/local/src/typo3/TRUNK/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapFactory.php", 
45, array)


/usr/local/src/typo3/TRUNK/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapFactory.php:

00043:   * @return void
00044:   */

00045:  public function 
injectReflectionService(Tx_Extbase_Reflection_Service $reflectionService) {

00046:   $this->reflectionService = $reflectionService;
00047:  }


13 
Tx_Extbase_Persistence_Mapper_DataMapFactory::injectReflectionService(NULL)


/usr/local/src/typo3/TRUNK/typo3/sysext/extbase/Classes/Dispatcher.php:

00282:
00283:    $dataMapFactory = 
t3lib_div::makeInstance('Tx_Extbase_Persistence_Mapper_DataMapFactory');

00284: 
$dataMapFactory->injectReflectionService(self::$reflectionService);

00285:
00286:    $dataMapper = 
t3lib_div::makeInstance('Tx_Extbase_Persistence_Mapper_DataMapper'); // 
singleton


12 Tx_Extbase_Dispatcher::getPersistenceManager()


/usr/local/src/typo3/TRUNK/typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php:

00137:   $this->objectManager = 
t3lib_div::makeInstance('Tx_Extbase_Object_Manager');
00138:   $this->arguments = 
t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_Arguments');

00139: 
$this->arguments->injectPersistenceManager(Tx_Extbase_Dispatcher::getPersistenceManager());

00140: 
$this->arguments->injectQueryFactory(t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory'));
00141:  }


11 Tx_Extbase_MVC_Controller_AbstractController::initializeObjects()


/usr/local/src/typo3/TRUNK/typo3/sysext/workspaces/Classes/Controller/PreviewController.php:

00043:    // removed this because the injection breaks for some reason 
when viewOnClick hook inits this object
00044:   if ($initializeObjects) {

00045:    $this->initializeObjects();

00046:   }
00047:  }


10 Tx_Workspaces_Controller_PreviewController::__construct(boolean)

9 ReflectionClass::newInstanceArgs(array)


/usr/local/src/typo3/TRUNK/t3lib/class.t3lib_div.php:

05292:
05293:     $reflectedClass = new ReflectionClass($className);

05294:     $instance = 
$reflectedClass->newInstanceArgs($constructorArguments);

05295:    } else {
05296:     $instance = new $className;


8 t3lib_div::makeInstance("Tx_Workspaces_Controller_PreviewController", 
boolean)


/usr/local/src/typo3/TRUNK/typo3/sysext/workspaces/Classes/Service/Befunc.php:

00047:  public function preProcess($pageUid, $backPath, $rootLine, 
$anchorSection, &$viewScript, $additionalGetVars, $switchFocus) {
00048:   if ($GLOBALS['BE_USER']->workspace !== 0 && 
!$GLOBALS['BE_USER']->user['workspace_preview']) {

00049:    $ctrl = 
t3lib_div::makeInstance('Tx_Workspaces_Controller_PreviewController', true);

00050:    $uriBuilder = 
t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');
00051:    /**


7 tx_Workspaces_Service_Befunc::preProcess("50", "../../../", "", "", 
"/index.php?id=", "", boolean)


/usr/local/src/typo3/TRUNK/t3lib/class.t3lib_befunc.php:

02709:     $hookObj = t3lib_div::getUserObj($funcRef);
02710:     if (method_exists($hookObj, 'preProcess')) {

02711:      $hookObj->preProcess($pageUid, $backPath, $rootLine, 
$anchorSection, $viewScript, $additionalGetVars, $switchFocus);

02712:     }
02713:    }


6 t3lib_BEfunc::viewOnClick("50", "../../../")


/usr/local/src/typo3/TRUNK/typo3/class.db_list_extra.inc:

01150:   if ($table=='pages' || $table=='tt_content') {
01151:    $params='&edit['.$table.']['.$row['uid'].']=edit';

01152:    $cells['view']=''.

01153:       t3lib_iconWorks::getSpriteIcon('actions-document-view') .
01154:      '';


5 localRecordList::makeControl("pages", array)


/usr/local/src/typo3/TRUNK/typo3/class.db_list_extra.inc:

00704:      $theData[$fCol] = $this->createReferenceHtml($table, 
$row['uid']);
00705:     } elseif ($fCol == '_CONTROL_') {

00706:      $theData[$fCol]=$this->makeControl($table,$row);

00707:     } elseif ($fCol == '_AFTERCONTROL_' || $fCol == '_AFTERREF_') {
00708:      $theData[$fCol] = ' ';


4 localRecordList::renderListRow("pages", array, 1, "title", NULL)


/usr/local/src/typo3/TRUNK/typo3/class.db_list_extra.inc:

00551:       $cc++;
00552:       $this->translations = FALSE;

00553:       $iOut.= 
$this->renderListRow($table,$row,$cc,$titleCol,$thumbsCol);

00554:
00555:        // If localization view is enabled it means that the 
selected records are either default or All language and here we will not 
select translations which point to the main record:


3 localRecordList::getTable("pages", 26, "editlock")


/usr/local/src/typo3/TRUNK/typo3/class.db_list.inc:

00300: #debug($this->pidSelect,$tableName);
00301:      // Finally, render the list:

00302:     $this->HTMLcode.=$this->getTable($tableName, $this->id, 
implode(',',$fields));

00303:    }
00304:   }


2 recordList::generateList()


/usr/local/src/typo3/TRUNK/typo3/sysext/list/mod1/db_list.php:

00312:
00313:     // Render the list of tables:

00314:    $dblist->generateList();

00315:
00316:     // Write the bottom of the page:


1 SC_db_list::main()


/usr/local/src/typo3/TRUNK/typo3/sysext/list/mod1/db_list.php:

00516:
00517: $SOBE->clearCache();

00518: $SOBE->main();

00519: $SOBE->printContent();
00520:




More information about the TYPO3-team-core mailing list