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'm currently running into an issue were a user receives the following fatal error if they do not have the permission to create the "Event" content type the calendar is generated from. The pages are displayed using the view templates provided and the "Add Event" link is enabled.
Unsupported operand types in public_html/sites/all/modules/calendar/calendar.module on line 172
The line in question is from the calendar_menu_local_tasks_alter() function:
// The add new content page would redirect to the new event
// if we did not override that here. This way they will
// redirect back to the calendar.
$item['localized_options'] += array('query' => array());
Let me know if there's anything else I can provide to help locate what could be causing this.
Comment | File | Size | Author |
---|---|---|---|
#4 | unsupported-operand-type-fatal-error-viewing-calendar-without-create-permission-1734858-4.patch | 638 bytes | Elin Yordanov |
Comments
Comment #1
Jaws CreditAttribution: Jaws commentedI had the same problem, solved it by adding:
before line 172
Comment #2
marc.denning CreditAttribution: marc.denning commentedI had the same issue, and the solution proposed by Jaws worked for me.
Comment #3
manuelBS CreditAttribution: manuelBS commentedthe posted solution works for me, too
Comment #4
Elin Yordanov CreditAttribution: Elin Yordanov commentedThanks Jaws! I made a patch file for the added lines.
Comment #5
Elin Yordanov CreditAttribution: Elin Yordanov commentedI also change the status of the issue to RTBC.
Comment #6
fizk CreditAttribution: fizk commentedCommitted, thanks!