Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
TypeError: explode(): Argument #2 ($string) must be of type string, Drupal\Core\Url given in explode() (line 962 of /var/www/html/web/modules/contrib/calendar/src/CalendarHelper.php)
#0 /var/www/html/web/modules/contrib/calendar/src/CalendarHelper.php(962): explode('/', Object(Drupal\Core\Url))
#1 /var/www/html/web/modules/contrib/calendar/src/CalendarHelper.php(930): Drupal\calendar\CalendarHelper::getViewRouteParameters(Array, Object(Drupal\views\ViewExecutable))
#2 /var/www/html/web/modules/contrib/calendar/src/CalendarHelper.php(912): Drupal\calendar\CalendarHelper::getViewsURL(Object(Drupal\views\ViewExecutable), 'page_month', Array)
#3 /var/www/html/web/modules/contrib/calendar/calendar.theme.inc(89): Drupal\calendar\CalendarHelper::getURLForGranularity(Object(Drupal\views\ViewExecutable), 'month', Array)
#4 [internal function]: template_preprocess_calendar_mini(Array, 'calendar_mini', Array)
#5 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array('template_prepro...', Array)
#6 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(422): Drupal\Core\Theme\ThemeManager->render('calendar_mini', Array)
#7 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(201): Drupal\Core\Render\Renderer->doRender(Array, false)
#8 /var/www/html/web/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render(Array)
#9 /var/www/html/vendor/twig/twig/src/Environment.php(418) : eval()'d code(52): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#10 /var/www/html/vendor/twig/twig/src/Template.php(405): __TwigTemplate_f91d7ad38533f6f474470976fed15eb2->doDisplay(Array, Array)
#11 /var/www/html/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling(Array, Array)
#12 /var/www/html/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)
#13 /var/www/html/web/core/themes/engines/twig/twig.engine(55): Twig\Template->render(Array)
#14 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('modules/contrib...', Array)
#15 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(422): Drupal\Core\Theme\ThemeManager->render('calendar_year', Array)
Steps to reproduce
Click to view the Year calendar page (with no contextual filter entered in the URL)
Comments
Comment #2
solideogloria CreditAttribution: solideogloria commentedComment #3
oaswebThis patch solved it for me
https://www.drupal.org/project/calendar/issues/3217106
I had a problem that seems to be exactly the same.
Comment #4
joelpittetHopefully that fixes the issue, sorry I forgot to tag a release after that. Beta1 will have that in it and is released today.