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.
I stumbled upon this problem this morning when trying to set a contextual filter on an unrelated view. For some reason I couldn't configure a contextual filter. I could add one but I couldn't get the settings UI overlay to render.
I checked my JS console and noticed that it was a series of AJAX errors so I started uninstalling Views Plugins. As soon as I disabled the Calendar views plugin, the contextual filter was operating again. The Calendar Datetime component of the module is still enabled.
Drupal core 8.0.1
Calendar 8.x-1.x-dev (2015-Dec-07)
PHP 5.5.30
Comment | File | Size | Author |
---|---|---|---|
#4 | calendar-options_form_error-2632106-4.patch | 1.44 KB | tedbow |
Comments
Comment #2
awasson CreditAttribution: awasson commentedComment #3
Anonymous (not verified) CreditAttribution: Anonymous at XIO commentedWhen adding any contextual filter, the CalendarValidator::buildOptionsForm() gets called. But when trying to find a default replacement format on a non calendar argument, an error is thrown since the argument_wrapper is null:
Actually, I'm not sure why that validator defines a buildOptionsForm() in the first place.
Comment #4
tedbowOk I didn't know it would be called then here is patch that should fix it.
The option form is used to set the date format that will be used if the argument "title" twig replacement is used. The default templates use this for the views header.
Details here: #2625734: Create ability to override title based on Date argument with formated date
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous at XIO commentedOh I see, so that was the right fix after all. Manually tested and it works as expected. The return in the getDefaultReplacementFormat() is not needed though, so I removed that on commit.
Comment #7
awasson CreditAttribution: awasson commentedPerfect! That works just great.
Thanks,
Andrew