Project

General

Profile

Actions

Bug #21774

closed

User Tools/Worspace screen stage change buttons problem

Added by Gabriel Lavoie over 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-12-02
Due date:
% Done:

0%

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

Description

The buttons to change the stage of a record are not shown to the right user with custom workspaces. The button to send to review is only available for the reviewer and the button to send to publish is only available to the workspace owner. This behaviour is different from the Web/Versionning screen.

Patch included to solve the issue.

(issue imported from #M12887)


Files

state-change-bug-class.wslib_gui.php.patch (1.27 KB) state-change-bug-class.wslib_gui.php.patch Administrator Admin, 2009-12-02 15:33
0012887_state-change-bug_v2.diff (2.98 KB) 0012887_state-change-bug_v2.diff Administrator Admin, 2010-01-29 17:44
12887_v3_T3_4_3_branch.diff (3.69 KB) 12887_v3_T3_4_3_branch.diff Administrator Admin, 2010-09-15 17:56
12887_v3_T3_4_4_branch.diff (3.69 KB) 12887_v3_T3_4_4_branch.diff Administrator Admin, 2010-09-15 17:56
12887_v3_T3_trunk.diff (3.71 KB) 12887_v3_T3_trunk.diff Administrator Admin, 2010-09-15 17:57
12887_v3_T3_4_3_branch_corrected.diff (3.82 KB) 12887_v3_T3_4_3_branch_corrected.diff Administrator Admin, 2010-09-15 18:03
Actions #1

Updated by Marcel Fiedrich over 14 years ago

The "Do-List" doesn't contain "publish" and "swap" in new workspaces.

I fixed this on line 200 in the class.wslib_gui.php.

Replace this:
if ($this->publishAccess && !($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1)) {
with:
if ($this->publishAccess) {

Then it should be working.

Actions #2

Updated by Calderini Daniel over 14 years ago

Patch works but there is still a problem with the Do-list.
I changed lines 209-212 of file class.wslib_gui.php with following:

$tableHeader .= '<option value="stage_-1">' . $LANG->getLL('label_doaction_stage_reject') . '</option>';
$tableHeader .= $GLOBALS['BE_USER']->workspaceCheckStageForCurrent('-1') ? '<option value="stage_0">' . $LANG->getLL('label_doaction_stage_editing') . '</option>' : '';
$tableHeader .= $GLOBALS['BE_USER']->workspaceCheckStageForCurrent('0') ? '<option value="stage_1">' . $LANG->getLL('label_doaction_stage_review') . '</option>' : '';
$tableHeader .= $GLOBALS['BE_USER']->workspaceCheckStageForCurrent('1') ? '<option value="stage_10">' . $LANG->getLL('label_doaction_stage_publish') . '</option>' : '';

It works but don't know if it's the right way to do it.

Actions #3

Updated by Robert Heel about 14 years ago

Hi Daniel, I've patched the 4.2 patch 0009415 the same way :-)

Merged changes into 0012887_state-change-bug_v2.diff

Actions #4

Updated by Julian Kleinhans over 13 years ago

Can`t reproduced with current trunk version

Actions #5

Updated by Stefano Kowalke over 13 years ago

I can reproduce the error with the current version 4.4.2. if I apply the patch the issue is fixed.

Actions #6

Updated by dermueller no-lastname-given over 13 years ago

I can confirm this, too, with TYPO3 4.4.2.

In class.wslib_gui.php, function displayWorkspaceOverview_stageCmd there is a switch made:
switch((int)$rec_off['t3ver_stage'])

In case the current stage is 0 ("Editing"), $sId is set to 1. Then this value is passed to
$GLOBALS['BE_USER']->workspaceCheckStageForCurrent($sId)

So let's look into class.t3lib_userauthgroup.php and check the function workspaceCheckStageForCurrent:

This assumes 1 as "review", not as "editing". So if review_stage_edit is not set, $memberStageLimit becomes 0 and thus
$stage<=$memberStageLimit
gets translated to
1<=0
and this returns false. No arrow-icons shown.

If would be correct to pass -1 or 0 (not sure) as value for $stage. Just as the comment above the function in the source code says!

Actions #7

Updated by Sonja Schubert over 13 years ago

I can confirm the problem with 4.3.2. I then used the patch 0012887_state-change-bug_v2.diff and it worked fine.

Actions #8

Updated by Julien Bourdin over 13 years ago

Bug confirmed for the 4.3 and 4.4 branch.

I reviewed the class wslib_gui and I confirm that the patch 0012887_state-change-bug_v2.diff do the right thing.

For no reason, the target stage is sent instead of the current stage to check if you can do the change.

It should be corrected in the release as soon as possible since it is a real malfunction. (I wonder why so few reports had been done)

Actions #9

Updated by Caspar Stuebs over 13 years ago

I have tested the patch and it works for me also, but I have 2 suggestions:

In my opinion the check if ($rec_off['t3ver_stage'] != 10) (or < 10 !?) should by moved to the parent if statement, because the $onClick variable is not used at all if $rec_off['t3ver_stage'] 10.

The second thing is, that the reject action should not be parsed, if the state is 'editing' ($rec_off['t3ver_stage'] 0), because I don't see the need that an editor should reject his own work before sending it to review. So for the reject if statement it should be ($rec_off['t3ver_stage'] > 0)

I have added 3 patches _v3 for 4.3, 4.4 and Trunk, including these changes.

I send them to the core list also.

Actions #10

Updated by Caspar Stuebs over 13 years ago

I have send the patch for 4.4 two times with name for 4.3 and 4.4, sorry

I have added the corrected one also ...

Actions #11

Updated by Marc Wöhlken over 13 years ago

Experienced exaclty the same problem with current V 4.3.10. The patch worked for me.

+1

Actions #12

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #13

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF