? ? ? Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
2 Sep 2018

Pull Request for Issue #21707 . (second part)

Summary of Changes

This PR let the multilang sample data creating a new Workflow to ensure, that the articles are published

Testing Instructions

  • Install a 2nd language
  • Apply the "Multilingual Sample Data" (from the dashboard)
  • check the workflows, a new workflow called "Sample Workflow (xx-xx)" is created and assigned to the specific new sample data category (xx-xx is the language tag).
avatar bembelimen bembelimen - open - 2 Sep 2018
avatar bembelimen bembelimen - change - 2 Sep 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2018
Category Administration Language & Strings Front End Plugins
avatar brianteeman
brianteeman - comment - 2 Sep 2018

Can you update this please
PLG_SAMPLEDATA_MULTILANG_STEP6_SUCCESS

avatar bembelimen bembelimen - change - 2 Sep 2018
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 2 Sep 2018

Category created but showing no articles

chrome_2018-09-02_23-50-51

Workflows created but only with one stage and no transitions

image

Articles not listed but do exist in the db

image
image

avatar brianteeman
brianteeman - comment - 2 Sep 2018

I have tested this item 🔴 unsuccessfully on 356e15d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21968.

avatar brianteeman brianteeman - test_item - 2 Sep 2018 - Tested unsuccessfully
avatar infograf768
infograf768 - comment - 3 Sep 2018

In fact (not taking into account the transitions which should be the same as Joomla default imho), is missing the article set in _workflows_associations.

In my POC I had added in private function addArticle($itemLanguage, $categoryId)

+		$query->clear()
+			->insert($db->qn('#__workflow_associations'))
+			->values($newId . ', 2,' . $db->quote('com_content'));
+
+		$db->setQuery($query);
+
+		try
+		{
+			$db->execute();
+		}
+		catch (JDatabaseExceptionExecuting $e)
+		{
+			$this->setError($e->getMessage());
+
 			return false;
 		}

In this case with this new workflow, the value has to change in
->values($newId . ', 2,' . $db->quote('com_content')); if I do not mistake.

I do not see the reason to create a specific workflow per language btw.
Call it what you want but it can be generic for all content languages, imho.

avatar bembelimen
bembelimen - comment - 3 Sep 2018

The last commit did not go through last night..... I recommited it, should be fixed now.

avatar infograf768
infograf768 - comment - 3 Sep 2018

This corrects now the status of articles. Tks.
Remains the fact that the new workflow do not have the same stages than joomla default and that it looks overkill to create a workflow per language.

avatar bembelimen
bembelimen - comment - 3 Sep 2018

For stages the same applies as here.

For The workflow itself...I have no feelings if there should be one for each language or one in general...It's just a matter of moving the creation outside of the foreach...

avatar infograf768
infograf768 - comment - 3 Sep 2018

Simple is better. Call it "Sample Multilingual Workflow" and out the foreach. :)

avatar chmst
chmst - comment - 3 Sep 2018

I have tested this item ✅ successfully on 83b0f51

Tested successfully with de-DE and en-GB. All data found as described.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21968.

avatar chmst chmst - test_item - 3 Sep 2018 - Tested successfully
avatar Didldu-Florian
Didldu-Florian - comment - 3 Sep 2018

I have tested this item ✅ successfully on 83b0f51


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21968.

avatar Didldu-Florian Didldu-Florian - test_item - 3 Sep 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Sep 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Sep 2018

Ready to Commit after two successful tests.

avatar infograf768
infograf768 - comment - 4 Sep 2018

Please be nice to drone. Param $itemlanguage is no more. :)

FILE: ...github.com/joomla/joomla-cms/plugins/sampledata/multilang/multilang.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
987 | ERROR | Superfluous doc comment at position 1
avatar infograf768
infograf768 - comment - 5 Sep 2018

@bembelimen
Please correct drone

avatar bembelimen bembelimen - change - 5 Sep 2018
Labels Added: ?
avatar bembelimen bembelimen - change - 10 Sep 2018
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2018-09-10 13:52:45
Closed_By bembelimen
avatar bembelimen bembelimen - close - 10 Sep 2018
avatar infograf768
infograf768 - comment - 11 Sep 2018

@bembelimen Why was this closed?

avatar bembelimen
bembelimen - comment - 11 Sep 2018

Ooops, I deleted the branch accidently, here is the PR again: #22123

Add a Comment

Login with GitHub to post a comment