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.
After installing 7.x-3.4, the calendar block does not view properly. Further, the following issues are seen:
- Error 'calendar_plugin_style: The calendar row plugin is required when using the calendar style, but it is missing.' seen.
- Navigating to 'admin/structure/views/view/calendar/edit' results in 500 error.
- The following error seen in dblog:
'calendar_plugin_style: The calendar row plugin is required when using the calendar style, but it is missing.'
in calendar_plugin_style->render() (line 228 of sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Comments
Comment #1
carlnewton CreditAttribution: carlnewton commentedI also have this issue with the new D7 update, except I don't get the 500 error you mentioned. I did before I cleared the cache though. Following.
Edit: I get the following warning appear twice on the view edit page:
"Style Calendar requires a row style but the row plugin is invalid."
Comment #2
waverate CreditAttribution: waverate commentedSame issue as OP.
- missing calendar pluging style message
- missing calendar_plugin_style error in dblog
- cannot edit view:
Comment #3
Simon Georges CreditAttribution: Simon Georges commentedIt appears that sometimes, you need to rebuild the View using the last Calendar template (at least it seems to have worked on my instance).
Comment #4
waverate CreditAttribution: waverate commentedSimon's advice at #3 works.
I deleted the view and then built a new view from template (/admin/structure/views/add-template).
I lucked out that after I deleted the original view, I could save the new view with the same name; thus most of my CSS was not affected.
Comment #5
KarenS CreditAttribution: KarenS commentedThat is the right solution. I had to create some new calendar components that work better than the old ones did and it resulted in deprecating some old ones. Creating a new view will make everything work.
Comment #6
polskikrol CreditAttribution: polskikrol commentedI see 9 different templates to pick from... which one is the correct one to retain original functionality?
Also, any reason why such a drastic change did not have database schema changes to make the old view compatible ?
Comment #7
Lostboy22 CreditAttribution: Lostboy22 commentedA message with the "Release Notes" explaining calendar views must be recreated would be nice.
Comment #8
metakel CreditAttribution: metakel commentedI have tried exporting the view-> import it again.
However it does not work. Should I need to rebuilt the view from scratch?
My previous views were quite complicated. I am afraid it is not that easy to do so.
Now I have downgraded to use version 7.3.
Comment #9
Simon Georges CreditAttribution: Simon Georges commented@polskikrol, each template is actually the same, but targetting a different date field, so choose the one regarding the date field you want to use for your calendar.
Comment #10
carlnewton CreditAttribution: carlnewton commentedThanks guys, that's the solution. More specifically, these are the steps I took:
1. Go to admin/structure/views
2. In the list of views, find the Calendar view
3. Under the Operations column, click Delete
4. From the same page, click 'Add view from template'
5. Select whichever view matches your field name (can be found under admin/structure/types/manage/[event node type]/fields)
6. Ensure you save the view
Comment #11
kylebcooke CreditAttribution: kylebcooke commentedFor anyone not wanting to re-create their calendar views the following can be done.
$handler->display->display_options['row_plugin'] = 'calendar_entity';
Hope this helps!
Comment #12
manicato CreditAttribution: manicato commentedI get the following error when I try to rebuild the view with a template:
Original View disappeared but no new is created.
Comment #13
metakel CreditAttribution: metakel commented#11's solution restores the calendar at the Month page. However, it does not work on all other display: year page, week page, and the month block.
Comment #14
nasinandes CreditAttribution: nasinandes commentedGreat!! I follow the #11 steps and its works again.
Thanks!!
Comment #15
KarenS CreditAttribution: KarenS commentedThe solution is to create a new view. There is no way to 'change the schema' of an existing view automatically, so there is no way for the code to do this automatically.
Comment #16
hynnot CreditAttribution: hynnot commented+1 #10 #15
It's necessary to delete the view and create it new.
Comment #17
NowThatsCookin.Com CreditAttribution: NowThatsCookin.Com commented#10 worked for me with one exception. I did not have the ability to "delete" it, but instead disabled it.
Got it to working now, thanks for the help!!
Frank
Comment #18
Ole Martin CreditAttribution: Ole Martin commentedFor me it was #10 who fix my problem.
Thanks!
Comment #19
rv0 CreditAttribution: rv0 commentedcries..
as KarenS says in #5, recreating all your views is the only "stable" solution
I can't help but wonder why a simple module update can become such a pain and it is not mentioned anywhere in the release notes? Don't we care for some little backwards compatibilty? How about deprecating stuff instead of deleting it?
For me this means hours of work recreating all the views, and lots of chances to make mistakes in doing so :( It is a rather complex site and I use calendar functionality in many places.
Luckily I didn't take any chances and used a testserver first..
Comment #21
einarps CreditAttribution: einarps commentedFor me it was #10 - thank you.
Comment #22
TechNikh CreditAttribution: TechNikh commentedI Exported the view, removed the code related to
/* Display: Week */
(This display was causing problem to me and I don't need it)imported the view code with "Replace an existing view if one exists with the same name" and "Bypass view validation"
Comment #23
kingfisher64 CreditAttribution: kingfisher64 commentedI've read the fixes for this however wouldn't it make more sense then to remove the calendar views by default if you have to delete it and re-create them? Seems very strange to leave something installed that basically needs deleting straight away.
Can these views be removed and instructions on how to create them be included in the readme.txt file instead?
Thank you
Comment #24
kingfisher64 CreditAttribution: kingfisher64 commentedAdded to previous comment there's no way to delete the broken views. There's only a disable option in the dropdown. Clicking on edit to go into the view then normally click the delete view just outputs the following in the view.
( ! ) Fatal error: Call to a member function summary_title() on a non-object in C:\wamp\www\sitename\sites\all\modules\views\plugins\views_plugin_display.inc on line 1192
This has also broken http://drupal.org/project/events_calendar_feature.
Comment #25
_vid CreditAttribution: _vid commented@kylebcooke that is fantastic! Thanks much.
I had the WSOD with this error:
I followed your advice and made some other changes and my calendar views are back!
Here are my complete steps:
.
$handler->display->display_options['row_plugin'] = 'calendar_entity';
just below the last
in the /* Display: Master */ before any field declarations like: /* Field: Content: Title */.
I found that I had one for each display:
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
to
$handler->display->display_options['defaults']['row_plugin'] = TRUE;
unless you have a display that already has a
entry.
In that case leave it false. Ex:
@metakel: This may help your issue
Block notes:
I noticed the error when running
$ drush cc all
.Ex: I had 2 blocks (block_1, block_2) and the highest number was 2 so
$handler = $view->new_display('block', 'Upcoming', 'block_1');
became
$handler = $view->new_display('block', 'Upcoming', 'block_3');
and
$handler = $view->new_display('block', 'Upcoming', 'block_2');
became
$handler = $view->new_display('block', 'Upcoming', 'block_4');
Perhaps I could have avoided this by using some combination of cache clearing and db updating but the damage was done and this fixed it.
Optional steps (these may not be necessary)
Now my calendars are back and I don't have any php errors.
@KarenS; Could something like this be done programmatically?
Comment #26
hebbar10 CreditAttribution: hebbar10 commentedThanks vid (#25), it worked for me.
Comment #27
ppatnaik CreditAttribution: ppatnaik commentedHurray I solved the issue.
I was stuck at this issue for a long time.
Then I solved the issue.
Solution :
The Events Calender view that gets generated automatically is having some default settings.
And It happens many time that You don't have all the same in your site.
step 1 : delete or Disable the View : Events Calender
step 2: Create a new view using : create View using Template.
step 3:SELECT CALENDER AND THE DATE FIELD THAT YOU WANT THE VIEW TO BE TRACKED ON.
step 4 : allocate your view to specific block and enjoy the special calender features of your website.
Comment #28
webdrips CreditAttribution: webdrips commentedThanks @_vid, #25 worked!
Note to avoid step #7, I simply deleted the calendar view prior to re-importing it.
Comment #29
_vid CreditAttribution: _vid commentedGreat. Glad it's working for others. @webdrips; thanks for the tip on Step #7.
Comment #30
danielbeeke CreditAttribution: danielbeeke commentedThanks all, #25 fixed it for me!
Comment #31
Thambos CreditAttribution: Thambos commentedThanks #25!
I was wondering with your fix in Step 7 with the blocks though, does that cause any sort of problems? I've had to do the same thing in order to still access our Blocks list, and so I'm hoping it doesn't cause any other problems.
Comment #32
_vid CreditAttribution: _vid commented@Thambos, I haven't seen any problems arise from Step 7. You're essentially creating a new view, so you just have to be dilligent with the block numbering.
If you do have problems you can always create a new calendar from a template and then delete the broken displays / view.
Comment #33
DamienMcKennaClosed a duplicate: #1607916: calendar_plugin_style error
Comment #34
DamienMcKennaFYI I'm still running into this problem after creating a view from a template.
Comment #35
DamienMcKennaIn my scenario I'm using a view created from a view template, but it's still showing the following error:
Warning: Creating default object from empty value in calendar_plugin_row->pre_render() (line 312 of calendar/includes/calendar_plugin_row.inc).
Comment #36
DamienMcKennaInterestingly enough, the problem only happened when display the "Upcoming" block, the regular mini calendar block didn't cause problems.
Incidentally, the block was taking almost a minute to render (as reported by Panels Why So Slow) and was using about 560mb to render the page (as reported by Devel). With the block disabled, the entire page rendered in a few seconds and the max memory limit was 34mb.
I think part of the problem might have been triggered by Panels / Panels Everywhere. I was using PE to render the Upcoming block and originally the summary for the pane was saying "Using display" whereas it should have said "Using display Upcoming". I removed the block from the PE display and re-added it, at which point the pane summary finally had the correct label and the memory usage was back to normal. So there may be scenarios triggering this problem.
Comment #37
qmjeelani CreditAttribution: qmjeelani commentedComment #10 works for me
Comment #38
kingfisher64 CreditAttribution: kingfisher64 commentedrecreating the view from template works quickly, however there is still no way to delete the view. I just disabled it. https://www.drupal.org/project/event_calendar was what I was using.
Comment #39
qasimzee CreditAttribution: qasimzee commented#10 should be added in README.txt
Comment #40
Neslee Canil Pinto