Found by audriusb in #2492011: Port Calendar module to Drupal 8
Any ideas why I need to change
$item_start_date = \DateTime::createFromFormat($storage_format, $row->{$info['query_name']});
$item_end_date = \DateTime::createFromFormat($storage_format, $row->{$info['query_name']});
in /modules/contrib/calendar/src/Plugin/views/row/Calendar.phpto
$item_start_date = \DateTime::createFromFormat('U', $row->{$info['query_name']});
$item_end_date = \DateTime::createFromFormat('U', $row->{$info['query_name']});
when working with "authored on" date field? field stores timestamp format and seems like I can't use anything else other than 'U' format ... How can I change $storage_format format?
Comment | File | Size | Author |
---|---|---|---|
#6 | authored_on_errors_combined-2769085-6.patch | 6.57 KB | meramo |
#6 | interdiff-2769085-3-6.txt | 1.05 KB | meramo |
#5 | authored-on-errors_2769085_5.patch | 6.91 KB | meramo |
#5 | interdiff-2769085-3-5.txt | 1.39 KB | meramo |
#3 | interdiff-2769085-2-3.txt | 5.2 KB | geertvd |
Comments
Comment #2
geertvd CreditAttribution: geertvd at Geert van Dort commentedComment #3
geertvd CreditAttribution: geertvd at Geert van Dort commentedComment #4
meramo CreditAttribution: meramo at Bright Solutions GmbH commentedThe patch worked for me, although still getting two identical errors on the calendar page
Notice: Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager->getHandler() (line 104 of core/modules/views/src/Plugin/ViewsHandlerManager.php).
For the record, using a calendar block here
Comment #5
meramo CreditAttribution: meramo at Bright Solutions GmbH commentedAs we have the HEAD stuck for this module, some patches start to conflict, so made an improved version of this one to address another annoying issue here https://www.drupal.org/node/2789829
Comment #6
meramo CreditAttribution: meramo at Bright Solutions GmbH commentedWow, we have a new dev and for some reason the previous patch stopped working for the "Authored on" fields. So created a new one, tested with BOTH authored on and long field machine names, so this issue and this one are still combined in one patch as they change the same lines essentially. Again, not sure if it's the best practice but it worked.
Interdiff attached is against the original patch in #3
Comment #7
meramo CreditAttribution: meramo at Bright Solutions GmbH commentedComment #8
adriancidI solved the problem in #4 with this patch: https://www.drupal.org/node/2837728#comment-11832592