Project

General

Profile

Actions

Task #43916

closed

Epic #58282: Workspaces Workpackage #2

Story #58284: Bug fixes & Behaviour

File Repository does not work with Workspaces

Added by Devid Messner over 11 years ago. Updated over 5 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 4 (0 open4 closed)

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
Actions #1

Updated by Reindl Bernd about 11 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.

Actions #2

Updated by Marius S. about 11 years ago

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

Please have this one released.

Actions #3

Updated by Gabe Blair over 10 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.

Actions #4

Updated by Alexander Opitz about 10 years ago

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

Updated by Alexander Opitz about 10 years ago

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

Updated by Alex Pöll almost 10 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

Actions #7

Updated by Markus Timtner almost 10 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

Actions #8

Updated by Alex Pöll almost 10 years ago

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

Actions #9

Updated by Benni Mack almost 10 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.

Actions #10

Updated by Gerrit Code Review almost 10 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

Actions #11

Updated by Gerrit Code Review almost 10 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

Actions #12

Updated by Gerrit Code Review almost 10 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

Actions #13

Updated by Gerrit Code Review almost 10 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

Actions #14

Updated by Gerrit Code Review almost 10 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

Actions #15

Updated by Gerrit Code Review almost 10 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

Actions #16

Updated by Oliver Hader almost 10 years ago

  • Parent task set to #58284
Actions #17

Updated by Gerrit Code Review almost 10 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

Actions #18

Updated by Gerrit Code Review almost 10 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

Actions #19

Updated by Gerrit Code Review almost 10 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

Actions #20

Updated by Benni Mack almost 10 years ago

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

Updated by Oliver Hader almost 10 years ago

  • Assignee set to Benni Mack

Updated by Alex Pöll over 9 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

Actions #23

Updated by Gerhard Rupp over 9 years ago

It seems that this is fixed in TYPO3 6.2.4.

Actions #24

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF