Create a tag.
Assign this tag to some articles.
Unpublish one of these articles.
Create a Compact List of Tagged Items menu item and display in frontend for this tag.
Code contains to check the core_state
joomla-cms/components/com_tags/tmpl/tag/list_items.php
Lines 92 to 96 in 7044520
The problem is that we never get the core_state if it is set to 0 as only items published are displayed.
The code was drastically modified in J4 vs J3 in the libraries/src/Helper/TagsHelper.php
by the PR #27107 which got rid of the core_state
array.
We have 2 solutions;
core_state
in the layout.Labels |
Added:
?
|
State filter is hardcoded here:
Understand. Therefore it is not necessary to check for core_state in the layout. Will make PR.
BUT we have another issue due to #27107
You got rid of publish up and publish down
This means that an item can be Published but not available to display in these cases but is yet displayed => 404.
The modules have kept this case. For example TagsSimilarHelper.php still contains
->extendWhere(
'AND',
[
$db->quoteName('cc.core_publish_up') . ' IS NULL',
$db->quoteName('cc.core_publish_up') . ' = :nullDateUp',
$db->quoteName('cc.core_publish_up') . ' <= :nowDateUp',
],
'OR'
)
->bind(':nullDateUp', $nullDate)
->bind(':nowDateUp', $now)
->extendWhere(
'AND',
[
$db->quoteName('cc.core_publish_down') . ' IS NULL',
$db->quoteName('cc.core_publish_down') . ' = :nullDateDown',
$db->quoteName('cc.core_publish_down') . ' >= :nowDateDown',
],
'OR'
)
->bind(':nullDateDown', $nullDate)
->bind(':nowDateDown', $now);
Here the article articletest_publish_later
is displayed in the compact list as well as in the normal list, but should not
But, it is not displayed in the Similar Tags Module, which is correct
In #27107 , I can see
Can you correct that?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-15 08:27:59 |
Closed_By | ⇒ | infograf768 |
This hasn't changed since J3. State filter is hardcoded here:
joomla-cms/components/com_tags/models/tag.php
Line 251 in 09b46f7