No Code Attached Yet J4 Issue
avatar brianteeman
brianteeman
23 Aug 2022

Steps to reproduce the issue

Create three articles and set the PUBLISHED date to 2020-01-0 2021-01-01, 2022-01-01,
Set the state of the three articles to Archived
Create a menu item for the archived articles with Date for Ordering set to Published
Visit archived link in the front end and check the filters

Expected result

image

Actual result

image

The problem is caused because the filter only collects years from the created date and not the value of Date for Ordering as expected

public function getYears()
{
$db = $this->getDatabase();
$nowDate = Factory::getDate()->toSql();
$query = $db->getQuery(true);
$years = $query->year($db->quoteName('c.created'));

System information (as much as possible)

Additional comments

avatar brianteeman brianteeman - open - 23 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Aug 2022
avatar rdeutz rdeutz - change - 24 Aug 2022
Labels Added: J4 Issue
avatar rdeutz rdeutz - labeled - 24 Aug 2022
avatar alikon
alikon - comment - 25 Aug 2022

please test #38595

avatar alikon alikon - change - 25 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-25 13:32:17
Closed_By alikon
avatar alikon alikon - close - 25 Aug 2022

Add a Comment

Login with GitHub to post a comment