Skip to content

Conversation

@brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Apr 19, 2022

Articles that are in a category which is unpublished or trashed are not visible on the site but there is no way you can tell this from the article manager

Summary of Changes

  1. Adds an indicator if the category is unpublished or trashed.
  2. Changes the published icon to a disabled icon and adds a tooltip to the icon

Testing Instructions

Create a catgory called test and create 4 featured articles in that category.
Unpublish or Trash the category

Check the list of articles and the list of featured articles

Actual result BEFORE applying this Pull Request

No indication that the article can not be displayed

Expected result AFTER applying this Pull Request

Text as shown in the image below

image

Documentation Changes Required

@rdeutz
Copy link
Contributor

rdeutz commented Apr 20, 2022

Looks like a good idea, I think this is something we should add and can be added to the next minor version.

@rdeutz rdeutz added the Maintainers Checked Used if the PR is conceptional useful label Apr 20, 2022
@rdeutz
Copy link
Contributor

rdeutz commented Apr 20, 2022

one addition: maybe better to solve this in the PublishedButton class. Then you only have to fix it one time and not in all views. Could be something like "Published but category unpublished or trashed"

@brianteeman
Copy link
Contributor Author

@rdeutz That was my first thought but then it gets complicated by workflows

@brianteeman
Copy link
Contributor Author

@rdeutz took another look but I dont see how to do it in the class as it is not aware of the category

@brianteeman
Copy link
Contributor Author

@rdeutz do you have any pointers as to how to solve it in the PublishedButton. If not I will continue with this approach.

@rdeutz
Copy link
Contributor

rdeutz commented Apr 22, 2022

I looked at the class and (beside Workflow, I don't see how this effects the buttom but maybe I missed something) it should be doable. I will check over the weekend and let you know.

@brianteeman
Copy link
Contributor Author

@rdeutz thanks

@rdeutz
Copy link
Contributor

rdeutz commented Apr 22, 2022

This should do the trick: rdeutz@847c041

@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Apr 22, 2022
@brianteeman brianteeman marked this pull request as ready for review April 22, 2022 13:53
@brianteeman
Copy link
Contributor Author

one addition: maybe better to solve this in the PublishedButton class. Then you only have to fix it one time and not in all views. Could be something like "Published but category unpublished or trashed"

as even your code requires a chang in the view I decided to combin the two

@BertaOctech
Copy link

I have tested this item ✅ successfully on d3bd885

The patch workes exactly as described


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

@pabloarias
Copy link

I have tested this item ✅ successfully on d3bd885

Tested in Joomla 4.1.3-dev with PHP 8.1.

Expected behaviour when category is unpublished or trashed.

It works in Featured Articles list too.


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

@chmst
Copy link
Contributor

chmst commented Apr 22, 2022

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 22, 2022
@bembelimen
Copy link
Contributor

I really like this PR, but it will not make it in 4.1, but for sure in 4.2!

Thanks for the improvement.

@bembelimen bembelimen changed the base branch from 4.1-dev to 4.2-dev April 23, 2022 19:57
@bembelimen bembelimen requested a review from rdeutz as a code owner April 23, 2022 19:57
@bembelimen bembelimen changed the title [4.1] Indicate if category not published [4.2] Indicate if category not published Apr 23, 2022
@Quy Quy removed the PR-4.1-dev label Apr 23, 2022
@bembelimen
Copy link
Contributor

bembelimen commented Apr 23, 2022

JFYI: the "too much files" will be fixed on Tuesday, then there will be the next upmerge from 4.1 (which is already in your branch) after the relese of J! 4.2 Alpha 2. Then we're back to normal (no additional human tests needed).

@brianteeman
Copy link
Contributor Author

No problem

@roland-d roland-d merged commit bb8e195 into joomla:4.2-dev Apr 26, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 26, 2022
@roland-d
Copy link
Contributor

Thanks everybody

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators Maintainers Checked Used if the PR is conceptional useful

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants