? Pending

User tests: Successful: Unsuccessful:

avatar Dako390
Dako390
26 Aug 2021

Summary of Changes

Based on the idea of: https://magazine.joomla.org/authors/nikita-dhiman

This PR provides a new entry to the menu called "Draft manager" and the options in "Articles" and "Article" to save one or more articles as drafts.

Draft Manager

In the "Draft manager" you can see all your drafts at once. It has a link to the original article (Link on title) and a link to the draft itself. You are able to manage these selected drafts and have the following options:

  • Select multiple drafts and share them. This option will create a shareable link of the drafted article.
  • Select multiple drafts and unshare them. This option will destroy the link and you can't open this link anymore (404 is going to happen).
  • Select multiple drafts and delete them. This option will delete the selected drafts.

Additionally there is a new button in "Articles" which allows you to save multiple articles as drafts and you can explicitly save a single article as draft in the "Edit" view.

2021-08-26_5 18 01_PM

2021-08-26_5 17 51_PM

This PR is mainly an idea of how a "Shareable content drafting" could look like. Not all functionalities are granted.

Before Testing

After pulling this PR you need to update your database in "System" --> "Maintenance" --> "Database". If you install Joomla! freshly with this PR everything should be set.

Testing Instructions

Create some articles as drafts, share them, test these links and delete these drafts.
Best practice at the moment would be to make a copy of the article you would like to draft, edit this copy, save it and then save it as a draft.

Expected result AFTER applying this Pull Request

You should be able to save articles as drafts and share them. Refer to the text and pictures above to get a feeling how to use the "Draft Manager".

Documentation Changes Required

Should be documented in the Joomla! Docs as a User Guide eventually.

avatar Dako390 Dako390 - open - 26 Aug 2021
avatar Dako390 Dako390 - change - 26 Aug 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Aug 2021
Category SQL Administration com_admin Postgresql com_banners com_categories com_contact com_content
avatar Dako390 Dako390 - change - 27 Aug 2021
Labels Added: ?
avatar bembelimen bembelimen - change - 27 Aug 2021
Title
4.1 Shareable content drafting
[4.1] Shareable content drafting
avatar bembelimen bembelimen - edited - 27 Aug 2021
avatar prozb prozb - change - 27 Aug 2021
Labels Added: ?
Removed: ?
avatar chmst
chmst - comment - 27 Aug 2021

Great work! At the first glance I suggest to replace the "Drafts Manager" in the Menu by "Drafts" - then it is consistent with other menu items.

avatar prozb prozb - change - 27 Aug 2021
Labels Added: ?
Removed: ?
avatar brianteeman
brianteeman - comment - 27 Aug 2021

Please see the comments I have made and apply those everywhere

avatar PhilETaylor
PhilETaylor - comment - 28 Aug 2021

Screenshot 2021-08-28 at 22 22 18

This could easily be lost in the 98 file changes - this needs reverting.

avatar brianteeman
brianteeman - comment - 28 Aug 2021

Please be careful when copy pasting code from other components etc to make sure that you update the doc blocks, comments and @since values accordingly.

If it is a new @since then you should not put a version number in but instead put DEPLOY_VERSION as this will be updated with the correct value when it is eventually merged and released.

avatar PhilETaylor
PhilETaylor - comment - 28 Aug 2021

Please convert all instances of

Factory::getUser()

to use the new way

Factory::getApplication()->getIdentity()

throughout this PR

avatar brianteeman
brianteeman - comment - 28 Aug 2021

Please ensure that when you are developing and testing the code that you have php error reporting on.

After creating my first draft and going to the draft manager

image


Notice: Undefined property: stdClass::$created_by in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 107

Notice: Undefined property: stdClass::$catid in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 109

Notice: Undefined property: stdClass::$catid in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 110

Notice: Undefined property: stdClass::$category_uid in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 110

Notice: Undefined property: stdClass::$parent_category_id in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 111

Notice: Undefined property: stdClass::$parent_category_id in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 112

Notice: Undefined property: stdClass::$parent_category_uid in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 112

Notice: Undefined property: stdClass::$checked_out in C:\htdocs\joomla-cms\administrator\components\com_content\tmpl\drafts\default.php on line 131
avatar PhilETaylor
PhilETaylor - comment - 28 Aug 2021

Are we happy with the opposite of "share" being "unshare" ? or should that be "stop sharing" ?

depending on which google search you do, "unshare" is or is not a real word.

avatar brianteeman
brianteeman - comment - 28 Aug 2021

Thanks for what you have done but I have some fundamental issues. While I appreciate the time you have spent on this for me it is not doing what it is intended to do in any usable way. I am surprised that your mentors allowed you to go along this path.

This is what I expected.

I can create a draft version of an article that I can share with someone for review.
When they make a suggestion for a change I go to the draft manager and select the article to edit. make the suggested change and then ask the reviewer to check the shared draft again

This is what actually happens

The article that i click on to edit in the draft manager is NOT the draft it is the LIVE article.
So any edits I make there to send back to the reviewer are NOT in the draft view they looked at before. Instead they are in the live article and the draft article has not changed at all.

This means that the draft article can never be updated as a draft unless you click on to edit in the draft manager, make the changes and then instead of saving the article I share it again as a draft.

I now have a draft version of the edited draft that I will now have to share again with a new link. Note that "share as draft" only creates a draft you still have to share it in the draft manager.

So now the draft manager has two versions of the article and they are both listed identically in the draft manager.

image

avatar bembelimen
bembelimen - comment - 4 Sep 2021

I am surprised that your mentors allowed you to go along this path.

Just for reference: this isn't a GSoC project.

avatar micker
micker - comment - 5 Sep 2021

sorry but i don't understand this ??
for me no relay need to create new view new entry ...
draft need to be a new state of content and shareable fonction include in workflow ...
why it can be done with actual j4 feature ??

avatar brianteeman
brianteeman - comment - 5 Sep 2021

@bembelimen oops my bad

avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar laoneo
laoneo - comment - 21 Oct 2022

Thank you very much for your effort on this idea. Unfortunately the pr needs some big architecture and UI changes that it is better to start from scratch. Nevertheless, this idea has a big potential and we would like to encourage further contributors to get in touch with the maintainers team to discus the best approach for this feature. I'm closing this for now.

avatar laoneo laoneo - change - 21 Oct 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-10-21 15:06:30
Closed_By laoneo
Labels Added: ?
Removed: ?
avatar laoneo laoneo - close - 21 Oct 2022

Add a Comment

Login with GitHub to post a comment