Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Implement the workflow into the multilang sample data #21968

Closed

Conversation

bembelimen
Copy link
Contributor

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).

@brianteeman
Copy link
Contributor

Can you update this please
PLG_SAMPLEDATA_MULTILANG_STEP6_SUCCESS

@brianteeman
Copy link
Contributor

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

Copy link
Contributor

@brianteeman brianteeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve the language changes

@brianteeman
Copy link
Contributor

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.

@infograf768
Copy link
Member

infograf768 commented Sep 3, 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.

@bembelimen
Copy link
Contributor Author

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

@infograf768
Copy link
Member

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.

@bembelimen
Copy link
Contributor Author

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...

@infograf768
Copy link
Member

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

@chmst
Copy link
Contributor

chmst commented Sep 3, 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.

@HRIT-Florian
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Sep 4, 2018

Ready to Commit after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 4, 2018
@infograf768
Copy link
Member

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

@infograf768
Copy link
Member

@bembelimen
Please correct drone

@bembelimen bembelimen closed this Sep 10, 2018
@bembelimen bembelimen deleted the workflow-sample-data-multi branch September 10, 2018 13:52
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 10, 2018
@infograf768
Copy link
Member

@bembelimen Why was this closed?

@bembelimen
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants