Project

General

Profile

Actions

Bug #15883

closed

Could not publish from draft [t3lib_TCEmain::doesRecordExist() and autoversioned content]

Added by Thomas Soumarmon over 18 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2006-03-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

I had a problem publish changes done by a user in draft workspace.
user A may only edit in draft workspace.
user B is admin.

user A modifies a content (in templavoila) adding an autoversioned content.
user B wants to publish the new content (from Web > Versioning) and gets the message "You cannot publish a record you do not have edit and show permissions for".

ACLs looks OK (and user is admin). Digging into the code I found in t3lib_TCEmain::version_swap() that it checks if record exists (line 3461 in RC1) :
if ($this->doesRecordExist($table,$swapWith,'show') && $this->checkRecordUpdateAccess($table,$swapWith)) {
The tests returns false because pid is -1.

So, what I've done is modify t3lib_TCEmain::doesRecordExist() this way :
if (is_array($pageRec) || (!$output['pid'] && $this->admin) || (($output['pid'] == -1))) {

But I don't know if the problem is that it should not have got a -1 pid or if the test was wrong.

Anyway, typo3 is THE REAL GREAT OPENSOURCE CMS. And 4.0 looks even greater than previous versions. Nice work.

(issue imported from #M2964)

Actions

Also available in: Atom PDF