Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archived Articles wrong date #38565

Closed
brianteeman opened this issue Aug 23, 2022 · 1 comment
Closed

Archived Articles wrong date #38565

brianteeman opened this issue Aug 23, 2022 · 1 comment

Comments

@brianteeman
Copy link
Contributor

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

@alikon
Copy link
Contributor

alikon commented Aug 25, 2022

please test #38595

@alikon alikon closed this as completed Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants