Project

General

Profile

Actions

Bug #79031

closed

workspace Image/Text preview cannot find file reference

Added by Franz Holzinger almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2016-12-19
Due date:
% Done:

100%

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

Description

TYPO3 7.6.14:

An Image/Text field is added as a workspace content element. The processing of the image raises an exception with the following message:

No file reference (sys_file_reference) was found for given UID: "478"

However the image itself is shown fine in the preview. Only this exception should be turned off.

A wrong SQL is generated:

SELECT * FROM sys_file_reference WHERE uid = 478 AND sys_file_reference.deleted=0 AND (sys_file_reference.t3ver_wsid=0 OR sys_file_reference.t3ver_wsid=1) AND sys_file_reference.pid<>-1
num_rows()

Most workspace elements have the pid = -1. So the SQL query never finds anything.

SELECT * FROM sys_file_reference WHERE uid = 478 :

    uid     pid     tstamp     crdate     cruser_id     sorting     deleted     hidden     t3ver_oid     t3ver_id     t3ver_wsid     t3ver_label     t3ver_state     t3ver_stage     t3ver_count     t3ver_tstamp     t3ver_move_id     t3_origuid     sys_language_uid     l10n_parent     l10n_diffsource     uid_local     uid_foreign     tablenames     fieldname     sorting_foreign     table_local     title     description     alternative     link     downloadname     crop     autoplay
     478     -1     1477395403     1477395282     13     32     0     0     475     1     1     First draft version     -1     0     0     0     0     0     0     0     [BLOB - 99 B]    487     121     pages     media     1     sys_file     NULL    NULL    NULL        NULL        0

There are only 3 records where the SQL gives a result for workspaces:

     457     121     1477391014     1477391014     13     128     0     0     0     0     1     INITIAL PLACEHOLDER     1     0     0     0     0     0     0     0         280     1177     tt_content     assets     1     sys_file     NULL    NULL    NULL        NULL        0

    475     121     1477395282     1477395282     13     32     0     0     0     0     1     INITIAL PLACEHOLDER     1     0     0     0     0     0     0     0         487     121     pages     media     1     sys_file     NULL    NULL    NULL        NULL        0

    662     121     1480670051     1480670051     9     16     0     0     0     0     1     INITIAL PLACEHOLDER     1     0     0     0     0     0     0     0         286     1177     tt_content     image     1     sys_file     NULL    NULL    NULL        NULL        0

Debug Output:


CObjectViewHelper.php    119    cObjGetSingle
ContentObjectRenderer.php    859    render
ContentObjectRenderer.php    943    render
FilesContentObject.php    38    findAndSortFiles
FilesContentObject.php    108    addFileReferences
FileCollector.php    116    findFileReferenceByUid
FileRepository.php    129    getFileReferenceObject
ResourceFactory.php    584    getFileReferenceData
ResourceFactory.php    624    checkRecord
PageRepository.php    964    exec_SELECTquery
DatabaseConnection.php    308    myDebug
DatabaseConnection.php    817    callDebugger

Array
function/mode    Pg121 exec_SELECTquery(sys_file_reference) - ResourceFactory.php#584->getFileReferenceData // ResourceFactory.php#624->checkRecord // PageRepository.php#964->exec_SELECTquery
SQL query    SELECT * FROM sys_file_reference WHERE uid = 478 AND sys_file_reference.deleted=0 AND (sys_file_reference.t3ver_wsid=0 OR sys_file_reference.t3ver_wsid=1) AND sys_file_reference.pid<>-1
num_rows()
Integer
0
debug_backtrace    call_user_func#34 // {closure}# // TYPO3\CMS\Frontend\Http\Application->run#33 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#78 // TYPO3\CMS\Frontend\Http\RequestHandler->handleRequest#302 // TYPO3\CMS\Frontend\Page\PageGenerator::renderContent#216 // TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGet#210 // TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle#805 // TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->render#859 // TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject->render#943 // TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject->renderFluidView#102 // TYPO3\CMS\Fluid\View\AbstractTemplateView->render#300 // FluidCache_Standalone_layout_Default_cebafef54b1f45a115ee20541f391283bc9861d8->render#189 // TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic#201 // TYPO3\CMS\Fluid\View\AbstractTemplateView->renderSection#121 // FluidCache_Standalone_template_file_DefaultClean_27eb8eaa3d577cba2b9e92a4cb45f3d41a9d1424->section_cae0435c41e816c24f0838fdf4e76c044c8b4e00#230 // TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper->initializeArgumentsAndRender#56 // TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper->callRenderMethod#249 // call_user_func_array#268 // TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper->render# // TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle#119 // TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->render#859 // TYPO3\CMS\Frontend\ContentObject\FilesContentObject->render#943 // TYPO3\CMS\Frontend\ContentObject\FilesContentObject->findAndSortFiles#38 // TYPO3\CMS\Frontend\Resource\FileCollector->addFileReferences#108 // TYPO3\CMS\Core\Resource\FileRepository->findFileReferenceByUid#116 // TYPO3\CMS\Core\Resource\ResourceFactory->getFileReferenceObject#129 // TYPO3\CMS\Core\Resource\ResourceFactory->getFileReferenceData#584 // TYPO3\CMS\Frontend\Page\PageRepository->checkRecord#624 // Geithware\DebugMysqlDb\Database\DatabaseConnection->exec_SELECTquery#964 // Geithware\DebugMysqlDb\Database\DatabaseConnection->myDebug#308
miliseconds
Double
0.481
------------
SQL debug

---------------------

FluidTemplateContentObject.php    102    renderFluidView
FluidTemplateContentObject.php    300    render
AbstractTemplateView.php    189    render
Standalone_layout_Default_cebafef54b1f45a115ee20541f391283bc9861d8.php    201    renderStatic
RenderViewHelper.php    121    renderSection
AbstractTemplateView.php    230    section_cae0435c41e816c24f0838fdf4e76c044c8b4e00
Standalone_template_file_DefaultClean_27eb8eaa3d577cba2b9e92a4cb45f3d41a9d1424.php    56    initializeArgumentsAndRender
AbstractViewHelper.php    249    callRenderMethod
AbstractViewHelper.php    268    call_user_func_array
CObjectViewHelper.php    119    cObjGetSingle
ContentObjectRenderer.php    859    render
ProductionExceptionHandler.php    43    debug

Object TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException
message    No file reference (sys_file_reference) was found for given UID: "478" 
code
Integer
1317178794
file    /var/www/html/path/typo3_src-7.6.14/typo3/sysext/core/Classes/Resource/ResourceFactory.php
line
Integer
586
fh_debug handle $exception


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #79296: rootline fills in records from all workspaces in Live WorkspaceClosed2017-01-12

Actions
Actions

Also available in: Atom PDF