Skip to content

Conversation

@alikon
Copy link
Contributor

@alikon alikon commented Aug 18, 2018

Pull Request for Issue #21564 .

Summary of Changes

populate the #__workflow_associations table with items from #__content table

Testing Instructions

fresh install staging
Customize installation

skip languages &Install sample data

Expected result

all contents are visible on Articles Manager

Actual result

no content

@infograf768
Copy link
Member

This will not solve the issue for installing sample data via the sample data module.

@alikon
Copy link
Contributor Author

alikon commented Aug 18, 2018

yes correct this is only about the install with sample data
for the the sample data module i'm looking at your pr #21553

@infograf768
Copy link
Member

infograf768 commented Aug 18, 2018

My POC forces the use of a hardcoded value in __workflows_associations because I want these articles Published. It came from the default stage id 2 for the workflow_id 1 (Joomla! Default).
Therefore it is very complex to solve really as it would depend on the default workflow when using the sample data module.

This PR here is also using a hardcoded value but it may work because we have only ONE default workflow at install time. (Not sure btw what has been decided with installing sample data at Joomla install time).

@brianteeman
Copy link
Contributor

Except that currently you can install sample data at anytime

@alikon
Copy link
Contributor Author

alikon commented Aug 18, 2018

At install time there is and must be only 1 workflow the Joomla! Default one,
plus in the update.sql script we are assuming the same 2=published Joomla! Default stage
so hardcoding at install time ie with sample_testing.sql should be safe

one problem at the time please

@Bakual
Copy link
Contributor

Bakual commented Aug 18, 2018

The sampledata and its SQL files are supposed to be removed from the installation. There should only be the module for installing sampledata and that is done after the installation from the control panel.

So not sure if this PR is really needed.

@alikon
Copy link
Contributor Author

alikon commented Aug 18, 2018

The sampledata and its SQL files are supposed to be removed from the installation.

good to know

just want to know where me/we (mere mortals) can read about this Breaking News
And/Or when this should happen

@brianteeman
Copy link
Contributor

In dont think that removing the ability to install sql files from th installer is likely to happen as they are used heavily made template developers in their quick start builds

@Bakual
Copy link
Contributor

Bakual commented Aug 18, 2018

just want to know where me/we (mere mortals) can read about this Breaking News
And/Or when this should happen

The one and single goal of the "Sample Data Module" was to be able to drop the sample data SQL files and the sample data step in the installation. Maintaining both the sample data plugin(s) and the SQL files would be quite stupid.
We can't drop it in J3, but we (hopefully) will in J4.

In dont think that removing the ability to install sql files from th installer is likely to happen as they are used heavily made template developers in their quick start builds

I'm not familiar with how exactly templates add SQLs to their builds. Was that done in the same sample data step? Can't they use a sample data plugin to set up their example settings?

@brianteeman
Copy link
Contributor

The one and single goal of the "Sample Data Module" was to be able to drop the sample data SQL files and the sample data step in the installation. Maintaining both the sample data plugin(s) and the SQL files would be quite stupid.

Adding the plugin enabled users who installed joomla through a script provided by their hosts the opportunity to get the sample data

I'm not familiar with how exactly templates add SQLs to their builds. Was that done in the same sample data step?

Quite often yes - I know yootheme does.

Basically in J3 if you drop an sql file into the installation/sql folder then the installer would pick it up

Can't they use a sample data plugin to set up their example settings?

I guess so - but its quite hard to write isnt it (especially if you have a lot of data)?

@wojsmol
Copy link
Contributor

wojsmol commented Aug 18, 2018

@Bakual Additionally the sample data plugin for testing sample data is now incompatible with Joomla! 4, see joomla-extensions/testing-sample-data#2.

@Bakual
Copy link
Contributor

Bakual commented Aug 18, 2018

Basically in J3 if you drop an sql file into the installation/sql folder then the installer would pick it up

Ah, didn't know that was dynamically generated. If we need to still support that, it could be done so it only shows that step if there actually are any files and we remove the sample data ones? Never tried what happens if there are no files at all.

I guess so - but its quite hard to write isnt it (especially if you have a lot of data)?

Depends what you want to achieve, It can be done very simple: You could make it applying still an SQL file. It gets complex once you want to support different languages and use entered data in a successive step like in the testing sampledata where an article refers to another article.

@Bakual
Copy link
Contributor

Bakual commented Aug 18, 2018

Additionally the sample data plugin for testing sample data is now incompatible with Joomla! 4,

Just needs someone who creates a PR and someone else who tests it and then someone else who merges it 😄

@wojsmol
Copy link
Contributor

wojsmol commented Aug 18, 2018

@Bakual I can test but needed changes in code are to hard for me to make 😄

@Bakual
Copy link
Contributor

Bakual commented Aug 18, 2018

It's hard to fix anyway as J4 is still a moving target.

@wojsmol
Copy link
Contributor

wojsmol commented Aug 18, 2018

I know that but for me the namespacing part is hard.


try
{
$contents = $db->loadObjectList();
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps ->loadColumn() and act with the array alone?

@bembelimen
Copy link
Contributor

I have tested this item ✅ successfully on 95c4c9e

Looks good


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

@alikon
Copy link
Contributor Author

alikon commented Oct 13, 2018

too much mess

@alikon alikon closed this Oct 13, 2018
@alikon alikon deleted the patch-105 branch January 27, 2020 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants