Bug #5737

PHP warning in getDates() - arElasticSearchInformationObjectPdo

Added by Jesús García Crespo over 8 years ago. Updated almost 8 years ago.

Status:VerifiedStart date:10/03/2013
Priority:HighDue date:
Assignee:Dan Gillean% Done:

100%

Category:Search / BrowseEstimated time:2.00 hours
Target version:Release 2.1.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

Warning at /lib/model/arElasticSearchInformationObjectPdo.class.php on line 398
  Missing argument 2 for arElasticSearchInformationObjectPdo::getDates(),
  called in /lib/model/arElasticSearchInformationObjectPdo.class.php on line 859 and defined

Instead of receiving $culture as an argument, getDates() should create a dictionary with all the languages available for that event. This only affects to the date field, start_date and others are not i18n fields.

When you change the signature of getDates() make sure that you update the code where that method is invoked to avoid more warnings. Also please make sure that things are being indexed as expected in ES and after the change update any code extracting the date field as you'll need to know the i18n code to access to its value. I expect that you can do that with get_search_i18n() as we've done with other i18n fields in ES.

History

#1 Updated by José Raddaoui Marín over 8 years ago

  • Target version changed from Release 2.0.0 to Release 2.0.1

I've just avoid the warning for the moment

#2 Updated by Jesús García Crespo over 8 years ago

  • Target version changed from Release 2.0.1 to Release 2.0.2

#3 Updated by José Raddaoui Marín over 8 years ago

  • Status changed from New to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean
  • % Done changed from 0 to 100

I've added events to the ElasticSearch index as a nested only type here: https://github.com/artefactual/atom/tree/dev/issue-5737. And I've modified the dates section in the search results, showing the text date when it's populated and showing the first event with date values (text, start or end).

The search index needs to be rebuilt.

#4 Updated by José Raddaoui Marín over 8 years ago

  • Status changed from QA/Review to Verified

#5 Updated by José Raddaoui Marín over 8 years ago

AtoM|commit: 7eed699385a6db54b4cbd1ecb89c562ef46d9734

#6 Updated by Dan Gillean almost 8 years ago

  • Target version changed from Release 2.0.2 to Release 2.1.0

Also available in: Atom PDF