Task #43916

Epic #58282: Workspaces Workpackage #2

Story #58284: Bug fixes & Behaviour

File Repository does not work with Workspaces

Added by Devid Messner almost 9 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2012-12-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The FileRepository \TYPO3\CMS\Core\Resource\FileRepository does not support versioning/workspaces. The bug is in the function "findByRelation".

The patch in attachment work for me.


Files


Related issues

Related to TYPO3 Core - Bug #48464: Images in workspaces don't workClosed2013-05-22

Actions
Related to TYPO3 Core - Task #59276: Integrate functional DataHandler tests for FALClosedOliver Hader2014-06-02

Actions
Has duplicate TYPO3 Core - Task #58305: Severe Issues with FAL records when in workspaces.ClosedBenni Mack2014-04-29

Actions
Has duplicate TYPO3 Core - Task #54956: Invalid workspace image preview in page and list moduleClosed2014-01-13

Actions
#1

Updated by Reindl Bernd over 8 years ago

Hello,

i have the same problem with TYPO3 6.0.3.

With this patch the relations for the workspace are found.

But if i create a relation in the workspace, the relation is lost. So i have extend the function.

@
public function findByRelation($tableName, $fieldName, $uid) {
$itemList = array();
if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) {
throw new \InvalidArgumentException('Uid of related record has to be an integer.', 1316789798);
}
$considerWorkspaces = !empty($GLOBALS['BE_USER']->workspace) && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled($tableName) ? 1 : 0;
if($considerWorkspaces) {
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'*',
$tableName,
'uid=' . intval($uid)
);
$row = $row[0];
\TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL($tableName, $row);
if(isset($row['_ORIG_uid']))
$uid = $row['_ORIG_uid'];
}
$references = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'*',
'sys_file_reference',
'tablenames=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($tableName, 'sys_file_reference') .
' AND deleted = 0' .
' AND hidden = 0' .
' AND uid_foreign=' . intval($uid) .
' AND fieldname=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($fieldName, 'sys_file_reference'),
'',
'sorting_foreign'
);
foreach ($references as $referenceRecord) {
if($referenceRecord['t3ver_state'] > 0) {
continue;
}
if ($considerWorkspaces) {
\TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('sys_file_reference', $referenceRecord);
}
$itemList[] = $this->createFileReferenceObject($referenceRecord);
}
return $itemList;
}@

This works fine for me.

#2

Updated by Marius S. over 8 years ago

Reindl Bernd's version works great for me! Thank you.

Please have this one released.

#3

Updated by Gabe Blair almost 8 years ago

Reindl Bernd: Thanks for the patch. Will you be submitting a Gerrit change for it? You will have a much better chance of getting it into the official core that way.

#4

Updated by Alexander Opitz over 7 years ago

  • Project changed from 1401 to TYPO3 Core
  • Category changed from Frontend to Frontend
#5

Updated by Alexander Opitz over 7 years ago

  • Category changed from Frontend to File Abstraction Layer (FAL)
  • Is Regression set to No
  • TYPO3 Version set to 6.0
#6

Updated by Alex Pöll over 7 years ago

Dear TYOP3 core team,

we're using TYPO3 6.1.7 and have experienced this problem. (Images of not yet published content don't show up in Preview).

Although we've implemented the above patch it's still not working.

I'd appreciate if you could help!

Are you going to fix this bug for TYPO3 6.1.7?

And is the same bug present in the new TYPO3 6.2 LTS Version?

Kind regards,
Alex

#7

Updated by Markus Timtner over 7 years ago

Hi Alex,

this issue has forced me to do the update to v6.2LTS - and I am not looking back since ;)
The FAL implementation is now fully Workspace compatible, along with other significant UI improvements.

Kind regards,

MT

#8

Updated by Alex Pöll over 7 years ago

Thanks a lot Markus for your fast response. Sounds good!

#9

Updated by Benni Mack over 7 years ago

Hey,

well, files might work, but file relations won't work with repositories at all anymore.

Change an image relation to tt_content (sys_file_reference) in a workspace and publish that - the live workspace will show two records.

#10

Updated by Gerrit Code Review over 7 years ago

  • Status changed from New 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/29712

#11

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

#12

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29712

#13

Updated by Gerrit Code Review over 7 years ago

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/30100

#14

Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29712

#15

Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29712

#16

Updated by Oliver Hader over 7 years ago

  • Parent task set to #58284
#17

Updated by Gerrit Code Review over 7 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29712

#18

Updated by Gerrit Code Review over 7 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29712

#19

Updated by Gerrit Code Review over 7 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29712

#20

Updated by Benni Mack over 7 years ago

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

Updated by Oliver Hader over 7 years ago

  • Assignee set to Benni Mack
#22

Updated by Alex Pöll about 7 years ago

Dear TYOP3 core team,

we've recently updated (from 6.1.7) to TYPO3 6.2.3 in order to have this problem solved. Unfortunately a new problem come up:

Images of not yet published content (workspaces mode) now appear twice in the backend layout of the page and in the website preview. Please have a look at the attached screenshots.

Thanks for your support,
Alex

#23

Updated by Gerhard Rupp about 7 years ago

It seems that this is fixed in TYPO3 6.2.4.

#24

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF