🇨🇦Canada @MorinLuc0

Account created on 14 June 2012, over 12 years ago
#

Recent comments

🇨🇦Canada MorinLuc0

More information I just found that this patch is correct in the application but when applied and used with views the \DateTime::ISO8601 is not understood and does break. View tries to format the date but since the ISO8601 is a formatted date already it generates an error.

I changed it to just use a unix timestamp and then views was able to format the dates.

[Fri Feb 02 15:19:15.351680 2018] [:error] [pid 14863] [client 99.240.70.181:60556] Uncaught PHP Exception InvalidArgumentException: "The timestamp must be numeric." at /var/www/html/dev/3-date-support/drupal/core/lib/Drupal/Component/Datetime/DateTimePlus.php line 199, referer: https://3-date-support.cmh.cflabs.ca/en/admin/structure/views/view/solr_instance

🇨🇦Canada MorinLuc0

Where to start with integrating this module with search api and solr.

When the occurrences values field is added to the index if the field carnality is not set to unlimited solr won't index the values because solr create a time single field(ts) not a time multi field(tm). We should be able to modify it using a hook_search_api_solr_field_mapping_alter.

2018-02-01 21:09:35.306 ERROR (qtp947679291-14) [   x:drupal] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: ERROR: [doc=ts3v6z-content-entity:node/6:en] multiple values encountered for non multiValued field ds_value: [2018-02-01T00:00:00Z, 2018-02-03T00:00:00Z, 2018-02-05T00:00:00Z, 2018-02-07T00:00:00Z, 2018-02-09T00:00:00Z, 2018-02-11T00:00:00Z, 2018-02-13T00:00:00Z, 2018-02-15T00:00:00Z, 2018-02-17T00:00:00Z, 2018-02-19T00:00:00Z, 2018-02-21T00:00:00Z, 2018-02-23T00:00:00Z, 2018-02-25T00:00:00Z, 2018-02-27T00:00:00Z]

After I changed the carnality on the field I did succeed in indexing the node with the multi value field. Then I tried to list the values in a views similar to ( https://www.drupal.org/project/date_recur/issues/2846298 → ). I didn't have any luck, the occurring fields were coming up blank. I was able to list the start date or use the rendered entity display to list the re occurring dates for this event.

Thinking more about integration with search api when indexing the content with a recur date. Would it make sense to fake/re write the data in the recur date field with the occurrences dates and have search api index the field as just a simple multi value date field.
Another possibility would be to have another field added to the content with just the list of occurrences and have search api index those.

It would be good to get some feedback from anyone. This will be a very crucial module since Core have no plans on implementing a re occurring date field.

Production build 0.71.5 2024