Bug #21774
closedUser Tools/Worspace screen stage change buttons problem
0%
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
Updated by Marcel Fiedrich almost 15 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.
Updated by Calderini Daniel almost 15 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.
Updated by Robert Heel almost 15 years ago
Hi Daniel, I've patched the 4.2 patch 0009415 the same way :-)
Merged changes into 0012887_state-change-bug_v2.diff
Updated by Julian Kleinhans over 14 years ago
Can`t reproduced with current trunk version
Updated by Stefano Kowalke over 14 years ago
I can reproduce the error with the current version 4.4.2. if I apply the patch the issue is fixed.
Updated by dermueller no-lastname-given over 14 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!
Updated by Sonja Schubert about 14 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.
Updated by Julien Bourdin about 14 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)
Updated by Caspar Stuebs about 14 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.
Updated by Caspar Stuebs about 14 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 ...
Updated by Marc Wöhlken almost 14 years ago
Experienced exaclty the same problem with current V 4.3.10. The patch worked for me.
+1
Updated by Alexander Opitz over 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)?
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
- Is Regression set to No
No feedback for over 90 days.