? Language Change ? Pending

User tests: Successful: Unsuccessful:

avatar MagnusSinger
MagnusSinger
24 Mar 2022

Pull Request for Issue #37312.

Summary of Changes

Added a new button to the article edit form on the frontend. It allows the user to save the article without closing the form. This corresponds with the functionality of the backend.

Testing Instructions

Edit an article from the frontend, the button will be on the bottom and you can save the article without being redirected

Actual result BEFORE applying this Pull Request

Only the ability to save the article and get redirected to it right afterward

Expected result AFTER applying this Pull Request

You can choose to only save the article and stay inside the edit form

Documentation Changes Required

None

avatar MagnusSinger MagnusSinger - open - 24 Mar 2022
avatar MagnusSinger MagnusSinger - change - 24 Mar 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2022
Category Front End com_content
avatar MagnusSinger MagnusSinger - change - 24 Mar 2022
Title
fix issue #37312
Add ability to save an article from the frontend without being redirected (#37312)
avatar MagnusSinger MagnusSinger - edited - 24 Mar 2022
avatar ChristineWk
ChristineWk - comment - 24 Mar 2022

I have tested this item successfully on 6ffe565


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

avatar ChristineWk ChristineWk - test_item - 24 Mar 2022 - Tested successfully
avatar richard67
richard67 - comment - 24 Mar 2022

@bembelimen Is this a new feature and so has to go into 4.2? Or can it be considered a progressive enhancement so it's ok for 4.1.x (likely 4.1.2)?

avatar bembelimen
bembelimen - comment - 24 Mar 2022

4.2 please

avatar richard67
richard67 - comment - 24 Mar 2022

@MagnusSinger Could you rebase the PR to 4.2-dev? Let us know if we shall help with that.

avatar MagnusSinger
MagnusSinger - comment - 24 Mar 2022

@richard67 yes sure

avatar MagnusSinger MagnusSinger - change - 24 Mar 2022
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2022
Category Front End com_content Unit Tests Repository Administration com_associations com_banners com_cache com_categories com_contact com_content com_fields com_finder com_installer com_joomlaupdate com_languages JavaScript com_media NPM Change
avatar MagnusSinger MagnusSinger - change - 24 Mar 2022
Labels Added: ? NPM Resource Changed
avatar roland-d
roland-d - comment - 24 Mar 2022

@MagnusSinger You can add the new language string JSAVEANDCLOSE to the language/en-GB/joomla.ini file.

avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2022
Category com_content Unit Tests Repository Administration com_associations com_banners com_cache com_categories com_contact com_fields com_finder com_installer com_joomlaupdate com_languages JavaScript com_media NPM Change Front End com_content
avatar MagnusSinger MagnusSinger - change - 24 Mar 2022
Labels Added: ?
Removed: ? NPM Resource Changed ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2022
Category com_content Front End Front End com_content Language & Strings
avatar MagnusSinger
MagnusSinger - comment - 24 Mar 2022

@roland-d thanks for the info, I added it

avatar MagnusSinger MagnusSinger - change - 24 Mar 2022
Labels Added: Language Change
avatar MagnusSinger
MagnusSinger - comment - 24 Mar 2022

@roland-d I just tested your idea and it didn't work, I would leave it like I did it

avatar roland-d
roland-d - comment - 24 Mar 2022

@MagnusSinger Why would it not work? I see no reason why it would not work. Looking further we could improve it better like this:

$menuitem = (int) $params->get('redirect_menuitem');

if (in_array($this->getTask(), ['save2copy', 'apply'], true))
{
	return $result;
}

// Check for redirection after submission when creating a new article only
if ($menuitem > 0 && $articleId == 0)

This works for me.

avatar richard67
richard67 - comment - 25 Mar 2022

@ChristineWk Could you test again with the latest changes? Thanks in advance.

avatar ChristineWk
ChristineWk - comment - 25 Mar 2022

I have tested this item successfully on 2b900dc

Don't know if important as it's not part of this PR:
Also clicked: save as copy. Message: Save failed with the following error: Category is required. Would possibly fit there: #37354
But everything here refers to the frontend.


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

avatar ChristineWk ChristineWk - test_item - 25 Mar 2022 - Tested successfully
avatar RickR2H
RickR2H - comment - 25 Mar 2022

I have tested this item successfully on 2b900dc


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

avatar RickR2H RickR2H - test_item - 25 Mar 2022 - Tested successfully
avatar RickR2H RickR2H - change - 25 Mar 2022
Status Pending Ready to Commit
avatar RickR2H
RickR2H - comment - 25 Mar 2022

RTC


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

avatar fancyFranci fancyFranci - change - 26 Mar 2022
Labels Added: ?
avatar fancyFranci fancyFranci - change - 26 Mar 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-03-26 17:26:05
Closed_By fancyFranci
avatar fancyFranci fancyFranci - close - 26 Mar 2022
avatar fancyFranci fancyFranci - merge - 26 Mar 2022
avatar fancyFranci
fancyFranci - comment - 26 Mar 2022

Thank you Magnus

avatar richard67
richard67 - comment - 26 Mar 2022

Yes, congratulations @MagnusSinger to your (as far as I know) first merged pull request for Joomla CMS.

avatar MagnusSinger
MagnusSinger - comment - 26 Mar 2022

Thank you @fancyFranci and @richard67 and all the others for helping me with this. It was indeed my first pull request, and I'm looking forward to some more :)

Add a Comment

Login with GitHub to post a comment