? bug PR-5.0-dev ? ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
22 Sep 2022

Summary of Changes

In J3 when saving an article as copy, the article was automatically unpublished. When introducing the workflow in August 2018, the line from this PR was removed and never returned. This means that articles, which are saved as a copy, that article is directly published. I hope that this is fixing an issue and not intentional. But I definitely want to hear the opinion from @bembelimen about this.

Testing Instructions

  1. Save an article as a copy. The new copy is directly published.
  2. Apply patch.
  3. Save an article as a copy. The new copy is unpublished.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar Hackwar Hackwar - open - 22 Sep 2022
avatar Hackwar Hackwar - change - 22 Sep 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2022
Category Administration com_content
avatar Hackwar Hackwar - change - 29 Sep 2022
Labels Added: PR-4.3-dev
avatar brianteeman
brianteeman - comment - 29 Sep 2022

Unfortunately this breaks the ability to save as copy when you are using workflows

avatar brianteeman
brianteeman - comment - 29 Sep 2022

Before

image

After

image

avatar HLeithner
HLeithner - comment - 30 Sep 2022

For my unpublish a copy on save article is a bad user experience anyway...

avatar brianteeman
brianteeman - comment - 30 Sep 2022

@HLeithner that may well be but we need to be consistent. If you use batch copy on an article then the state is changed to unpublished. Batch copy and save as copy should use the same state

I was wrong see #38810 (comment)

avatar HLeithner
HLeithner - comment - 30 Sep 2022

it was just a comment, I already accepted this for years so being consistent make sense.

avatar brianteeman
brianteeman - comment - 30 Sep 2022

The logic behind it was that if you are making a copy then you are probably doing it so that you can use the article as a basis for a new article. So at the point of copying you are not ready to publish

avatar HLeithner
HLeithner - comment - 30 Sep 2022

The logic behind it was that if you are making a copy then you are probably doing it so that you can use the article as a basis for a new article. So at the point of copying you are not ready to publish

I understand this, but that's not how I work, I modify an "old" article with everything I need and then click "save as copy", then I'm always irritated that I have to change the publish state again and have to save again, if you do this for a 10 articles initially on the website it's a pain. But yeah I then use batch publish and it's working too...

It's only an unexpected behavior from my point of view. But as I say already, I can life with it...

avatar brianteeman
brianteeman - comment - 30 Sep 2022

Actually now that I think about it I do exactly the same as you unless I am copying a bach of articles to edit individually later. So actually the current behaviour be fore this PR is how we both work and the PR is not needed.

Maybe the JET team should make aa decision on this one (assuming the bugs in this PR is fixed).

avatar HLeithner
HLeithner - comment - 30 Sep 2022

I notified them

avatar coolcat-creations
coolcat-creations - comment - 30 Sep 2022

In my personal opinion we need something like "Start a draft with a copy" only when I save it it would be saved then. So it does not matter if its published or not because it's only saved when I click on Save.

avatar brianteeman
brianteeman - comment - 30 Sep 2022

thats what workflows are for

avatar coolcat-creations
coolcat-creations - comment - 30 Sep 2022

But As I understand from the discussion here "save as copy" immediatelly saves and publishes the article. It should not be saved in this moment but a boilerplate for the new content and only saved when someone clicks on save.

avatar HLeithner
HLeithner - comment - 30 Sep 2022

But As I understand from the discussion here "save as copy" immediatelly saves and publishes the article. It should not be saved in this moment but a boilerplate for the new content and only saved when someone clicks on save.

That was the status in Joomla 3, Having an additional button would work too but we already have 5 "Save" buttons

avatar coolcat-creations
coolcat-creations - comment - 30 Sep 2022

I never said additional button ...

avatar crystalenka
crystalenka - comment - 10 Oct 2022

I think this is one of those things that's subjective and depends on how an individual is used to working.

Option 1: You go into an article, make changes, and then save the changes as copy. In this case, it makes sense for the article to be immediately published.

Option 2: You go into an article, save as copy, and then make changes. In this case, it makes sense for the article to be a draft.

Since it's subjective which is best, it might be better to look at which option causes the least harm if it works in a way someone doesn't expect.

With option 1, if you follow this process and it's saved as draft, it's a minor annoyance but just another couple of clicks to publish it.

With option 2, if you follow this process and it's immediately published, it means that you have (at best) a duplicated page and (at worst, depending on the template etc) a site that appears broken until you either unpublish it (if you notice it immediately) or make the changes you were intending.

So, we can see that saving a copy as draft causes the least harm.

Additionally, it's worth considering that saving as copy saves as draft in other core components even in J4 (custom fields, modules, etc) so the behavior should be consistent across the core components.

The fact that it's broken with the workflow doesn't change the fact that it should be consistent; I'd call it a bug in workflows to be honest. There's a default stage in workflows, so I would imagine that saving as copy should save it to the default stage in the appropriate workflow. That way people can determine the best default behavior for their use case, as is intended with workflows.

Finally, to mitigate the annoyance for people who follow the option 1 process without workflows and find it saved as draft, it would be helpful in the success message to say "Saved copy as draft. Set to published? [Publish]" or something like that across ALL core components.

Hope this helps!

avatar Hackwar Hackwar - change - 23 Oct 2022
Labels Added: ?
avatar crystalenka
crystalenka - comment - 16 Nov 2022

@Hackwar is this ready for testing? I saw Brian noted a bug with workflows but if that's resolved I am happy to test this

avatar brianteeman
brianteeman - comment - 16 Nov 2022

@crystalenka there have been no commits since I tested

avatar Hackwar Hackwar - change - 18 Apr 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-04-18 12:06:29
Closed_By Hackwar
Labels Added: bug ?
avatar Hackwar Hackwar - close - 18 Apr 2023
avatar Hackwar Hackwar - reopen - 18 Apr 2023
avatar Hackwar Hackwar - change - 18 Apr 2023
Status Closed New
Closed_Date 2023-04-18 12:06:29
Closed_By Hackwar
avatar Hackwar Hackwar - change - 18 Apr 2023
Status New Pending
avatar Hackwar Hackwar - change - 18 Apr 2023
Title
[4.3] Unpublish article when saving as copy
[5.0] Unpublish article when saving as copy
avatar Hackwar Hackwar - edited - 18 Apr 2023
avatar web-eau-net web-eau-net - test_item - 26 Aug 2023 - Tested successfully
avatar web-eau-net
web-eau-net - comment - 26 Aug 2023

I have tested this item ✅ successfully on 32fe22c


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

avatar ceford ceford - test_item - 15 Sep 2023 - Tested successfully
avatar ceford
ceford - comment - 15 Sep 2023

I have tested this item ✅ successfully on 32fe22c

In contrast to some of you, when I save as copy I always do that first to avoid accidentally saving changes to the original.


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

avatar Quy Quy - change - 16 Sep 2023
Status Pending Ready to Commit
avatar Quy
Quy - comment - 16 Sep 2023

RTC


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

avatar Quy Quy - change - 16 Sep 2023
Labels Added: ? PR-5.0-dev
Removed: PR-4.3-dev
avatar Hackwar
Hackwar - comment - 18 Sep 2023

Issue was unrelated to this PR. After updating branch, it now seems to work.

avatar HLeithner HLeithner - change - 18 Sep 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-18 12:59:59
Closed_By HLeithner
avatar HLeithner HLeithner - close - 18 Sep 2023
avatar HLeithner HLeithner - merge - 18 Sep 2023
avatar HLeithner
HLeithner - comment - 18 Sep 2023

sorry I reverted this merge because breaking another working part of the cms without a proposed fix is not an option

avatar brianteeman
brianteeman - comment - 23 Sep 2023

Should this be re-opened then?

avatar HLeithner
HLeithner - comment - 23 Sep 2023

do we have an original issue for this? if we have one then we should reopen it or create a new one

avatar obuisard
obuisard - comment - 11 Oct 2023

do we have an original issue for this? if we have one then we should reopen it or create a new one

Yes,
#37351

Add a Comment

Login with GitHub to post a comment