[6.2] Plugin for category change when a transition is executed for article - #45968
[6.2] Plugin for category change when a transition is executed for article#45968Dileepadari wants to merge 16 commits into
Conversation
|
The plugin needs to be added to the list of core extensions here libraries/src/Extension/ExtensionHelper.php |
|
Thank you @brianteeman for review, will update the pr soon with the changes. |
|
It might be that we have to move this to 6.1 as soon as we have created a 6.1-dev branch necause 6.0 has already had feature freeze with 6.0.0-beta1. |
|
Thanks @brianteeman and @richard67 for the review. I’ve made all the suggested changes. I really appreciate your time and feedback. |
|
@Dileepadari Now you have produced invalid SQL syntax in the update SQL scripts by using only a part of administrator/components/com_admin/sql/updates/mysql/6.0.0-2025-08-02.sql. The correct syntax is (exmaple from the mentioned other SQL): It is an Your statement has still This will result in an SQL syntax error. So it seems you did not check your SQL e.g. in phpMyAdmin. |
|
Thank you @Dileepadari this is a very nice addition to the workflow 👍 |
|
Hi @richard67, sorry for that. Can you let me know how can i test with PhpMyAdmin. Should I replace the #__extensions with the table name including table prefix? |
That would be one way to test it on the current Joomla installation. Another way would be to copy the CREATE TABLE statement from the base.sql and use it as it is to create an And when developing database stuff for Joomla it is a good idea to have a PostgreSQL database in addition to the MySQL (or MariaDB). |
|
Thanks for the info, it helps a lot in testing quickly. |
tecpromotion
left a comment
There was a problem hiding this comment.
Please adapt the two SQL files for Joomla 6.1.
heelc29
left a comment
There was a problem hiding this comment.
This plugin only works with com_content. However, since third-party components could also use the workflow function, this should not be the case.
|
This pull request has been automatically rebased to 6.2-dev. |
|
@Dileepadari - thank you for the PR - are planning to work on this? as there are changes requested. |
Thank you for the reminder, will update this ASAP |
|
I wanted to use this on a site and tested it by making an installable plugin from it. See github.com/HermanPeeren/workflow-plugins/tree/main/src/plg_workflow_category.
|
Thanks @HermanPeeren for taking time and giving your detailed review and suggestions, I have updated the pr accordingly. Please test it if you get some time. Thanks everyone for the reviews. |
Thanks @heelc29 for the review, I resolved all the comments you have given but for the category not showing part, I am not sure why its not displayed. The category change is disabled when you are editing the article but still you will be able to see the category. you will be able to set the category if you are creating the article or if the category is not set. Please provide me with theme details if you still can't see the category, I'll try to debug. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |


Summary of Changes
This PR introduces a workflow plugin that allows setting a category change when a transition is executed for articles.
Testing Instructions
Actual result BEFORE applying this Pull Request
In Extensions when searching for "workflow":

In the Transition Actions section:

Expected result AFTER applying this Pull Request
In Extensions when searching for "workflow":

In the Transition Actions section:

Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed