- Issue created by @gge
- Status changed to Needs work
over 1 year ago 9:22am 16 May 2023 - ๐จ๐ดColombia angelgarciaco Bogotรก, Colombia
Hey George
I was reviewing and that's right. Only shows us one item if many of them have the same time (hours, minutes, seconds) I've incrememted 1 sec and then the content is shown in the calendar.
So, you aren't the one.
-
matthieuscarset โ
committed 866e320a on 2.1.x
Handle multiple rows with same timestamp #3360483
-
matthieuscarset โ
committed 866e320a on 2.1.x
- Status changed to Needs review
over 1 year ago 11:07pm 16 May 2023 Thank you for reporting this issue.
It's fixed in the commit above.
Could you please test the dev branch and let me know if the situation is okay for your calendar(s)?
- Assigned to omkar_yewale
- Issue was unassigned.
- ๐ฎ๐ณIndia omkar_yewale Mumbai
Hi @matthieuscarset,
I have verified the module 2.1.x-dev version on both Drupal 9 and Drupal 10. In the Drupal 9 version, everything functions correctly, including the exact same date and time (including seconds) nodes. However, I encountered an issue with the Drupal 10 version. When I add more than two nodes with the same date, the view does not display anything and only shows a blank page. there are no error logs recorded in the recent log either.
- ๐ฉ๐ฐDenmark robotjox
I can confirm this problem.
The dev version breaks the calendar for us (we get a white page with half a calendar and no styling), but I dont know if that is a problem on our side. - ๐ฉ๐ฐDenmark robotjox
Error with dev applied:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO "cache_discovery" ("cid", "expire", "created", "tags", "checksum", "data", "serialized") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6) ON DUPLICATE KEY UPDATE "cid" = VALUES("cid"), "expire" = VALUES("expire"), "created" = VALUES("created"), "tags" = VALUES("tags"), "checksum" = VALUES("checksum"), "data" = VALUES("data"), "serialized" = VALUES("serialized"); Array ( [:db_insert_placeholder_0] => views:exposed_form [:db_insert_placeholder_1] => -1 [:db_insert_placeholder_2] => 1684320047.775 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => a:4:{s:3:"bef";a:9:{s:6:"parent";s:6:"parent";s:11:"plugin_type";s:12:"exposed_form";s:14:"register_theme";b:1;s:5:"title";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:22:"Better Exposed Filters";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:11:"short_title";s:0:"";s:4:"help";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:54:"Provides additional options for exposed form elements.";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:2:"id";s:3:"bef";s:5:"class";s:76:"Drupal\better_exposed_filters\Plugin\views\exposed_form\BetterExposedFilters";s:8:"provider";s:22:"better_exposed_filters";}s:10:"vefl_basic";a:9:{s:6:"parent";s:6:"parent";s:11:"plugin_type";s:12:"exposed_form";s:14:"register_theme";b:1;s:5:"title";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:19:"Basic (with layout)";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:11:"short_title";s:0:"";s:4:"help";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:37:"Adds layout settings for Exposed form";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:2:"id";s:10:"vefl_basic";s:5:"class";s:47:"Drupal\vefl\Plugin\views\exposed_form\VeflBasic";s:8:"provider";s:4:"vefl";}s:14:"input_required";a:9:{s:6:"parent";s:6:"parent";s:11:"plugin_type";s:12:"exposed_form";s:14:"register_theme";b:1;s:5:"title";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:14:"Input required";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:11:"short_title";s:0:"";s:4:"help";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:73:"An exposed form that only renders a view if the form contains user input.";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:2:"id";s:14:"input_required";s:5:"class";s:52:"Drupal\views\Plugin\views\exposed_form\InputRequired";s:8:"provider";s:5:"views";}s:5:"basic";a:9:{s:6:"parent";s:6:"parent";s:11:"plugin_type";s:12:"exposed_form";s:14:"register_theme";b:1;s:5:"title";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:5:"Basic";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:11:"short_title";s:0:"";s:4:"help";O:48:"Drupal\Core\StringTranslation\TranslatableMarkup":3:{s:9:"*string";s:18:"Basic exposed form";s:12:"*arguments";a:0:{}s:10:"*options";a:0:{}}s:2:"id";s:5:"basic";s:5:"class";s:44:"Drupal\views\Plugin\views\exposed_form\Basic";s:8:"provider";s:5:"views";}} [:db_insert_placeholder_6] => 1 ) i Drupal\Core\Cache\DatabaseBackend->doSetMultiple() (linje 273 af /var/www/clients/client2/web15/web/web/core/lib/Drupal/Core/Cache/DatabaseBackend.php).
- ๐ท๐ดRomania gge
Hello,
Applied the patch manually against version 2.1.1 and got this:
Got error 'PHP message: PHP Fatal error: Nesting level too deep - recursive dependency? in /var/www/public_html/web/modules/contrib/calendar_view/calendar_view.module on line 137'
Line 137 is:
array_multisort($array, SORT_ASC, $list);
The server is running php 8.1.18 (memory limit 2304M) and drupal 9.5.3.
Thanks~
- ๐ฉ๐ฐDenmark robotjox
thanks @gge - commenting out that line makes everything work.
Events still seem to be sorted correctly. - ๐ฎ๐ณIndia omkar_yewale Mumbai
I fixed it by using usort.
if (count($list) > 1) { $array = array_map(function ($row) { return $row['#values']['first_instance'] ?? NULL; }, $list); array_multisort($array, SORT_ASC, $list); }
To
if (count($list) > 1) { usort($list, function ($row1, $row2) { $firstInstance1 = $row1['#values']['first_instance'] ?? NULL; $firstInstance2 = $row2['#values']['first_instance'] ?? NULL; return $firstInstance1 <=> $firstInstance2; }); }
- ๐ท๐ดRomania gge
@robotjox you're welcome but not sure if the right solution is to comment out that line. As @matthieuscarset mentioned here ๐ Calendar doesn't show results when using pagination "Calender by month" Fixed , "Sort order is always ASC inside calendar days (e.g. in order to keep multiday events always at the top)"
- ๐ฉ๐ฐDenmark robotjox
@gge totally agree, but with out the patch a lot of events are not shown and with the patch site crashes, so until there is a proper solution, this hack works for us (we dont use many multiday events).
-
matthieuscarset โ
committed 3331f2be on 2.1.x
Issue #3360483 by omkar_yewale: When two nodes have the exact same date...
-
matthieuscarset โ
committed 3331f2be on 2.1.x
- Status changed to Fixed
over 1 year ago 2:14pm 18 May 2023 Thank you very much for your reviews and for the fix.
The issue is fixed on the dev branch (see referenced commit above).
Tested with multiple days and multiple fields overlapping on the same calendar day.
Feel free to reopen if you find a new situation.
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 10:04pm 5 July 2023 - ๐ง๐ชBelgium svendecabooter Gent
@matthieuscarset:
Any chance of tagging a new release soon, that includes this fix? Oh, thank you for the heads up!
I've tagged a new release 2.1.2 โ .