diff --git a/administrator/components/com_content/src/Model/ArticlesModel.php b/administrator/components/com_content/src/Model/ArticlesModel.php index cc82e2f71a861..67f7c149118ae 100644 --- a/administrator/components/com_content/src/Model/ArticlesModel.php +++ b/administrator/components/com_content/src/Model/ArticlesModel.php @@ -610,16 +610,17 @@ public function getTransitions() ] ) ->from($db->quoteName('#__workflow_transitions', 't')) - ->innerJoin($db->quoteName('#__workflow_stages', 's')) + ->innerJoin( + $db->quoteName('#__workflow_stages', 's'), + $db->quoteName('t.to_stage_id') . ' = ' . $db->quoteName('s.id') + ) ->where( [ - $db->quoteName('t.to_stage_id') . ' = ' . $db->quoteName('s.id'), $db->quoteName('t.published') . ' = 1', $db->quoteName('s.published') . ' = 1', ] ) - ->order($db->quoteName('t.ordering')) - ->group($db->quoteName('t.id')); + ->order($db->quoteName('t.ordering')); $where = []; diff --git a/composer.lock b/composer.lock index 9aebbc588d361..7f129ef1713a3 100644 --- a/composer.lock +++ b/composer.lock @@ -5759,12 +5759,12 @@ "source": { "type": "git", "url": "https://github.com/joomla-projects/joomla-browser.git", - "reference": "45a40262a139b599193f2aee0faefb29874d200a" + "reference": "0323d0d0741b0c9096bec5a015fc39444dd28cf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/45a40262a139b599193f2aee0faefb29874d200a", - "reference": "45a40262a139b599193f2aee0faefb29874d200a", + "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/0323d0d0741b0c9096bec5a015fc39444dd28cf5", + "reference": "0323d0d0741b0c9096bec5a015fc39444dd28cf5", "shasum": "" }, "require": { @@ -5802,7 +5802,7 @@ "acceptance testing", "joomla" ], - "time": "2020-04-12T10:39:07+00:00" + "time": "2020-05-01T19:53:33+00:00" }, { "name": "joomla/cms-coding-standards", diff --git a/libraries/src/Workflow/Workflow.php b/libraries/src/Workflow/Workflow.php index db381fbe36025..f2ecae8dda9bb 100644 --- a/libraries/src/Workflow/Workflow.php +++ b/libraries/src/Workflow/Workflow.php @@ -371,10 +371,12 @@ public function getAssociation(int $item_id): ?\stdClass ] ) ->from($db->quoteName('#__workflow_associations', 'a')) - ->innerJoin($db->quoteName('#__workflow_stages', 's')) + ->innerJoin( + $db->quoteName('#__workflow_stages', 's'), + $db->quoteName('a.stage_id') . ' = ' . $db->quoteName('s.id') + ) ->where( [ - $db->quoteName('a.stage_id') . ' = ' . $db->quoteName('s.id'), $db->quoteName('item_id') . ' = :id', $db->quoteName('extension') . ' = :extension', ] diff --git a/plugins/workflow/publishing/publishing.php b/plugins/workflow/publishing/publishing.php index f38dea91fd3d3..b7c73eb46f019 100644 --- a/plugins/workflow/publishing/publishing.php +++ b/plugins/workflow/publishing/publishing.php @@ -184,7 +184,8 @@ protected function enhanceItemForm(Form $form, $data) $form->setFieldAttribute($fieldname, 'type', 'spacer'); - $form->setFieldAttribute($fieldname, 'label', Text::sprintf('PLG_WORKFLOW_PUBLISHING_PUBLISHED', '' . htmlentities($text, ENT_COMPAT, 'UTF-8') . '')); + $label = '' . htmlentities($text, ENT_COMPAT, 'UTF-8') . ''; + $form->setFieldAttribute($fieldname, 'label', Text::sprintf('PLG_WORKFLOW_PUBLISHING_PUBLISHED', $label)); return true; } diff --git a/tests/Codeception/_support/Step/Acceptance/Administrator/Content.php b/tests/Codeception/_support/Step/Acceptance/Administrator/Content.php index cad35c9d28942..a0caa7a7d67d7 100644 --- a/tests/Codeception/_support/Step/Acceptance/Administrator/Content.php +++ b/tests/Codeception/_support/Step/Acceptance/Administrator/Content.php @@ -121,7 +121,7 @@ public function unPublishArticle($title) $I->checkAllResults(); $I->clickToolbarButton('Action'); $I->wait(2); - $I->clickToolbarButton('unpublish'); + $I->clickToolbarButton('transition', '1'); $I->filterByCondition($title, "Unpublished"); } @@ -144,7 +144,7 @@ public function publishArticle($title) $I->checkAllResults(); $I->clickToolbarButton('Action'); $I->wait(2); - $I->clickToolbarButton('publish'); + $I->clickToolbarButton('transition', '2'); $I->filterByCondition($title, "Published"); } @@ -168,7 +168,7 @@ public function trashArticle($title) $I->checkAllResults(); $I->clickToolbarButton('Action'); $I->wait(2); - $I->clickToolbarButton('trash'); + $I->clickToolbarButton('transition', '3'); $I->filterByCondition($title, "Trashed"); } @@ -210,7 +210,7 @@ public function filterByCondition($title, $condition) $I = $this; $I->click("//div[@class='js-stools-container-bar']//button[contains(text(), 'Filter')]"); $I->wait(2); - $I->selectOptionInChosenByIdUsingJs('filter_condition', $condition); + $I->selectOptionInChosenByIdUsingJs('filter_published', $condition); $I->see($title); } }