Project

General

Profile

Bug #62358

Updated by Riccardo De Contardi almost 8 years ago


 I ran into trouble because of massive warning messages in typo3temp/logs/typo3.log. The messages had all an equal topic like: 
 Mon, 01 Jan 2014 23:59:59 +0200 [WARNING] request="xxxxxxxxx" component="TYPO3.CMS.Frontend.ContentObject.ContentObjectRenderer": The image "" could not be found and won't be included in frontend output 

 The source for the log entries resides in the \TYPO3\CMS\Frontend\Page\PageGenerator::renderContentWithHeader(). Around line 896 a background image for the body tag will included while configured: 
 <pre> 
 if ($bgImg = $GLOBALS['TSFE']->cObj->getImgResource($GLOBALS['TSFE']->pSetup['bgImg'], $GLOBALS['TSFE']->pSetup['bgImg.'], 'bgImg')) { 
	 $bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' background="' . $GLOBALS['TSFE']->absRefPrefix . $bgImg[3] . '">'; 
 } 
 </pre> 

 The function getImgResource() is called every time even if pSetup is empty. In the catch block of the getImgResource() the log entries are assembled. 

 But the trigger (throw) for the the try/catch resides in \TYPO3\CMS\Core\Resource\ResourceStorage::assureFolderReadPermission(): 
 <pre> 
 protected function assureFolderReadPermission(Folder $folder = NULL) { 
	 if (!$this->checkFolderActionPermission('read', $folder)) { 
		 throw new Exception\InsufficientFolderAccessPermissionsException('You are not allowed to access the given folder', 1375955684); 
	 } 
 } 
 </pre> 


 I followed the permission function and finaly found the problem. In my case the root directory (/) had the permissions rwx--x--x. The check failed because TYPO3 tries to include an empty background image and has'nt the permission to read the / folder. I changed the permissions to rwxr-xr-x and the log is quiet now. 


 I'm not sure if this is realy a bug. But maybe there are some improvements: 
 * The exception #1375955684 is catched, but the message and code gets not logged.  
 * The install tool should check for read permission on / 
 * getImgResource could earlier check for an empty file and skip this deep filesystem checks 




Back