No Code Attached Yet
avatar mrownicki
mrownicki
6 Oct 2022

Steps to reproduce the issue

Upgrade 3.10.11 to 4.2.3
After migrating to Joomla 4, the categories are in the trashed, but not in the trashed.
Each category name in the articles view is as if it were in the trash. However, in categories it is visible normally.

screen shot 2022-10-06 at 14 19 50

If i in view articles and go to category show published.
View categories show published all.

Check ROOT is OK.
No override in admin view.
No plugin that might interfere.

Rebuild categories not working.
Move to trash and move to publish not working.

This is all symptoms bug :)

Expected result

View Articles - categories publish

Actual result

View Articles - categories publish and this same in trash.

System information (as much as possible)

Joomla 4.2.3 PHP 8.0

Additional comments

I check in version 4.1.5 if show normal.
administrator/components/com_content/tmpl/articles/default.php

Problem starts on version 4.2.0

Im in not dev but maybe this is problem. Line 301 (Joomla 4.2.3)

if ($item->category_published < '1') :
echo $item->category_published == '0' ? ' (' . Text::_('JUNPUBLISHED') . ')' : ' (' . Text::_('JTRASHED') . ')';
endif;

Justin White say.
"seems like '1' and '0' should be numbers not strings"
https://www.facebook.com/groups/joomlanospam/permalink/10158537073975997/

avatar mrownicki mrownicki - open - 6 Oct 2022
avatar mrownicki mrownicki - change - 6 Oct 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 Oct 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Oct 2022
avatar richard67
richard67 - comment - 6 Oct 2022

if ($item->category_published < '1') :
echo $item->category_published == '0' ? ' (' . Text::('JUNPUBLISHED') . ')' : ' (' . Text::('JTRASHED') . ')';
endif;

What happens if you change that line of code as follows?

if ((int) $item->category_published < 1) :
echo ((int) $item->category_published === 0) ? ' (' . Text::_('JUNPUBLISHED') . ')' : ' (' . Text::_('JTRASHED') . ')';
endif;
avatar brianteeman
brianteeman - comment - 6 Oct 2022

i would be very suprised if that was the cause of the problem as it has not changed

avatar chmst
chmst - comment - 6 Oct 2022
avatar mrownicki
mrownicki - comment - 7 Oct 2022

@richard67 now show UNPUBLISHED
image

avatar alikon alikon - change - 7 Oct 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-10-07 06:53:22
Closed_By alikon
avatar alikon alikon - close - 7 Oct 2022
avatar alikon
alikon - comment - 7 Oct 2022

please continue on #38673

Add a Comment

Login with GitHub to post a comment