Feature NPM Resource Changed PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar SRV-KILLER09
SRV-KILLER09
24 Mar 2026

Pull Request

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

This PR improves the publish/unpublish workflow for Articles and Featured lists by adding AJAX support. Users can now toggle statuses instantly without a full page reload, while the existing non-JavaScript redirect behavior is fully preserved for backward compatibility.

  • Added JSON response handling in publish() in ArticlesController.php without changing the default redirect flow for non-JSON requests.
  • Implemented an AJAX-based status toggle in articles-status.es6.js that:
    - Intercepts clicks on the publish/unpublish icons
    - Sends requests asynchronously with CSRF protection
    - Updates the icon, tooltip, and row state immediately
    - Displays success or error feedback messages
    - Falls back to normal form submission if AJAX fails
  • Integrated the status script into the Articles list view.
  • Ensured Featured list behaves the same way:
    - Loaded the same script in the Featured list view
    - Extended JS logic to handle both articles.* and featured.* publish tasks
  • Updated publish() in FeaturedController.php to avoid overriding redirects for JSON requests, ensuring proper AJAX handling.

Testing Instructions

  1. Open Administrator --> Content --> Articles
  2. Click the publish/unpublish icon on any row
  3. Confirm the status updates immediately without a page reload
  4. Check that success/error messages appear as expected
  5. Repeat steps 1–4 in Administrator --> Content --> Featured Articles
  6. Disable JavaScript (or simulate JS failure), trigger publish/unpublish, and confirm the normal submit/redirect flow still works
  7. Verify that no PHP syntax errors exist in the modified files

Actual result BEFORE applying this Pull Request

  1. Clicking publish/unpublish triggered a full page reload
  2. No AJAX handling was available for status toggles in Articles or Featured lists

Expected result AFTER applying this Pull Request

  1. Publish/unpublish actions are handled via AJAX without page reload
  2. UI updates instantly and shows feedback messages
  3. Non-JavaScript workflow remains fully functional
  4. Behavior is consistent across both Articles and Featured lists

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar SRV-KILLER09 SRV-KILLER09 - open - 24 Mar 2026
avatar SRV-KILLER09 SRV-KILLER09 - change - 24 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2026
Category Administration com_content JavaScript Repository NPM Change
avatar richard67
richard67 - comment - 24 Mar 2026

@SRV-KILLER09 Please check https://github.com/joomla/joomla-cms?tab=readme-ov-file#which-branch-should-my-pull-request-target . As this PR here is not a bug fix, it counts as new feature and so should be made for the 6.2-dev branch.

avatar SRV-KILLER09 SRV-KILLER09 - change - 24 Mar 2026
Labels Added: Feature NPM Resource Changed PR-5.4-dev
avatar richard67 richard67 - change - 24 Mar 2026
Title
Add AJAX JSON support for article publish toggles
[6.2] Add AJAX JSON support for article publish toggles
avatar richard67 richard67 - edited - 24 Mar 2026
avatar SRV-KILLER09 SRV-KILLER09 - change - 24 Mar 2026
Labels Added: PR-6.2-dev
Removed: PR-5.4-dev
avatar SRV-KILLER09
SRV-KILLER09 - comment - 24 Mar 2026

I have Fixed the CI failure by removing the deprecated getErrors() call in ArticlesController::publish(). All 52 checks are now passing. Ready for review..

avatar github-actions[bot]
github-actions[bot] - comment - 12 Apr 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

avatar brianteeman
brianteeman - comment - 3 Jul 2026

this should probably be closed as its covered by the larger ajaxify the admin project https://magazine.joomla.org/issues/2026/may-2026/joomla-summer-of-code

avatar ceford
ceford - comment - 18 Jul 2026

Although this is a bird in the bush versus a bird in the hand quandry, I agree with Brian: we need a solution that works for other components. It could be all JavaScript and may not be necessary to touch the existing controllers at all.


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

avatar ceford
ceford - comment - 18 Jul 2026

Although this is a bird in the bush versus a bird in the hand quandry, I agree with Brian: we need a solution that works for other components. It could be all JavaScript and may not be necessary to touch the existing controllers at all.


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

Add a Comment

Login with GitHub to post a comment