Problem/Motivation

When using a date facet with hour granularity, the SearchApiDate::calculateRangeAbsolute() method has a problem when concatenating the value to build the date object from. Pages trying to display items with this facet active, only show the following error message:

The date cannot be created from a format.

Proposed resolution

Use correct value concatenation to fix this problem.

Remaining tasks

Provide a patch

User interface changes

n/a

API changes

n/a

Data model changes

n/a

CommentFileSizeAuthor
#3 3009253-3.patch772 byteshctom
#2 3009253-2.txt772 byteshctom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hctom created an issue. See original summary.

hctom’s picture

Status: Active » Needs review
FileSize
772 bytes

Here is a patch that fixes the issue. The colons were missing when adding the minute and hour values.

hctom’s picture

FileSize
772 bytes

Sorry... here is the patch with correct file extension.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Sure, this is a small bug and it's an easy fix.

borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed, thanks!

  • borisson_ committed f9c5e31 on 8.x-1.x authored by hctom
    Issue #3009253 by hctom: Date facet with hour granularity builds wrong...

Status: Fixed » Closed (fixed)

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