Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect sorting by "Last Modified" in MODX browser #16731

@halftrainedharry

Description

@halftrainedharry

Bug report

Summary

In the MODX browser the files don't get correctly sorted by the "last modified" date, if the system setting manager_date_format doesn't have the default value.

Step to reproduce

  • Change the system setting manager_date_format to d.m.Y
  • Open the MODX browser (menu "Media" -> "Media Browser")
  • Change the dropdown "Sort By:" to "Last Modfied"
  • Verify that the order of the files is incorrect

Environment

MODX 3.1.2-pl

Cause

The processor Browser/Directory/GetFiles used to return the timestamp of a file (in the field "lastmod"). The formatting of the timestamps was done in JS. The sorting of the files was also done in JS using the timestamp.

With #16604 the processor now already returns the formatted time string. The sorting is done in JS using this already formatted strings.

Metadata

Metadata

Assignees

Labels

bugThe issue in the code or project, which should be addressed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions