-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4] When we have finished with sample data, unpublish its module and plugins #33165
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
Conversation
Signed-off-by: Phil E. Taylor <[email protected]>
This comment was marked as abuse.
This comment was marked as abuse.
|
This will make it harder to install Blog sample data multiple times when having a multilanguage site, one time for each backend language. It will need to enable the plugin again each time. Currently we can change language in backend and install blog sample data for each language, and when we later install another backend language, we can do that again for that language. This will not be possible anymore in this way. Ping @infograf768 . |
This comment was marked as abuse.
This comment was marked as abuse.
This is a flaw in the current architecture of the sampledata plugin/modules. The CMS has all the data (installed languages and content languages) to decide (or even ask the user) if the data should be installed in one or more languages. AFAIK there's already an open issue about sampledata: #32878 |
That issue doesn't cover the multilanguage aspect. Regarding this PR here it's not on me to decide if it's ok or not, I just wanted to mention that aspect here so it is not forgotten. |
|
I agree with @richard67 |
This comment was marked as abuse.
This comment was marked as abuse.
|
As I have stated before ad nauseum there is zero need to have the multilingual sample data plugin enabled if the site is not multilingual |
If the only way to do that is by doing it manually we should pack it here and start farming... |
This comment was marked as abuse.
This comment was marked as abuse.
Count the languages in |
|
It is very simple, once one has tested the feature at will, to start from scratch as was always done and then unpublish the module. but, as usual, do whatever you like. |
|
Nothing in that sentence makes any sense at all |
This comment was marked as abuse.
This comment was marked as abuse.
|
In Blog Sample Data we use this to check if we have multilanguage on: |
Anything less than 98% would be a surprise for me |
|
@PhilETaylor see #20749 |
This comment was marked as abuse.
This comment was marked as abuse.
|
It is simple but one person objects to it as they believe no one will know you can do it unless you shove it in front of their face until they get so annoyed with it they uninstall joomla |
This comment was marked as abuse.
This comment was marked as abuse.
Signed-off-by: Phil E. Taylor <[email protected]>
This comment was marked as abuse.
This comment was marked as abuse.
Signed-off-by: Phil E. Taylor <[email protected]>
|
The module itself should not be unpublished. Keep in mind that the module isn't exclusively used for core sample data. Each 3rd party extension can provide its own sample data as well. And I know for example DP Calendar does that. I'm not a big fan of extensions who publish/unpublish themself. I would offer a button to directly unpublish the plugin instead. So it can be hidden with a single click. |
|
We already have that button ;) Disable the plugin automatically THEN |
This comment was marked as abuse.
This comment was marked as abuse.
I can't name 5 but I can point you at https://github.com/dgrammatiko/sloth-pkg/tree/main/plg_sampledata which is way different from the core monstrosity plugins... ;) |
This comment was marked as abuse.
This comment was marked as abuse.
I dunno, but that was one of the initial ideas of using this approach. So instead that the extensions put their sample data hardcoded into their SQLs (like core did before), they can offer a plugin as well (like core does now). Obviously, the module could return empty if no sample data plugin is active (don't know if it does that today already). |
@brianteeman I meant for the plugins. I know that the modules all have such a button, that's where the idea came from 😄 |
This comment was marked as abuse.
This comment was marked as abuse.
|
I've created a simple PR to hide the module if no sample data plugin is published. See #33168 |
|
Button to go directly to the pluginmanager to disable plugins: |

As requested in #33150
Summary of Changes
When we have finished with sample data, unpublish its module and plugins - therefore gaining a tiny bit of performance.
Testing Instructions
Install Joomla 4
Install any of the sample data
refresh the Home Dashboard - note the module is no longer there
visit the Plugins and see they are unpublished
No side effects.
Actual result BEFORE applying this Pull Request
After using the sample data plugins, the module and plugins remain published, which is more db calls, more code running on each page load
Expected result AFTER applying this Pull Request
module and plugins are uninstalled for the life of a live site - gaining a tiny bit of performance as code is not run.
Documentation Changes Required
none