Actions
Bug #68548
closed[1.2.2]: Attempt to modify record '[No title]' (sys_file_reference:5297) without permission. Or non-existing page.
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2015-07-27
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:
Description
I get this error while trying to add file reference.
/** * * @param integer $pagesUid pages.uid * @param integer $contentElementUid tt_content.uid * @param array $fileObjects fal file original and fal file reference array */ function addFalFileReference($pagesUid, $contentElementUid, $fileObjects) { t3lib_div::devLog('function addFalFileReference', 'pritlisp', 2, array('refernce uid' => $fileObjects[0]['reference']['uid'])); $data = array(); $data['sys_file_reference'][$fileObjects[0]['reference']['uid']] = array( 'uid_local' => $fileObjects[0]['reference']['uid_local'], 'uid_foreign' => $contentElementUid, // uid of your content record 'tablenames' => 'tt_content', 'fieldname' => 'image', 'pid' => $pagesUid, // parent id of the parent page 'table_local' => 'sys_file', ); $data['tt_content'][$contentElementUid] = array('image' => '1'); t3lib_div::devLog('function addFalFileReference', 'pritlisp', 2, array('data' => $data)); $this->falData2Publish = $data; } /** * * */ function publishFalData() { /** @var \TYPO3\CMS\Core\DataHandling\DataHandler $tce */ $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\DataHandling\DataHandler'); // create TCE instance $tce->start($this->falData2Publish, array()); $tce->process_datamap(); if ($tce->errorLog) { t3lib_div::devLog('function publishFalData', 'pritlisp', 3, array('tce->errorLog' => $tce->errorLog)); } else { t3lib_div::devLog('function publishFalData', 'pritlisp', 3, array('data' => $data)); } }
This issue has been reported before:
https://forge.typo3.org/issues/50758
Actions