Problem/Motivation

In rare cases, the new dates map might produce duplicate results at the end of the list, due to an indeterministic sorting.

Steps to reproduce

Consider this scenario:

  • There are two date items (A and B) in the list that have the same start date and time.
  • Those dates are at position 60 and 61 in the list
  • When opening a page with the new dates map, the first 60 items are shown initially, containing A at the end
  • After a few seconds, a second date item for A is added at position 61

This is caused by the somewhat strange algorithm that consecutively loads all date items completely, even if that information is only needed for the map markers. When data is loaded for page 1 (the second call), item A is erroneously returned as the first item, because it has the same start date and time as item B.

Proposed resolution

Add some more sort criteria to make the sorting deterministic:

  • End date
  • Title

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mrshowerman created an issue. See original summary.

mrshowerman’s picture

Assigned: mrshowerman » Unassigned
Status: Active » Needs review

  • tobiasb committed 7ea92be9 on 2.5.x
    [#3548462] fix: Sorting of new dates map isn't deterministic
    
    By:...

tobiasb’s picture

Status: Needs review » Fixed

Both will be added to the view via update hook openculturas_map_update_10004.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.