Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
The calendar plugin style does not allow usage of inherited calendar_plugin_row_node. I need to inherit the style and change how the start & end date fields are identified as i have a complex widget developed.
Comment | File | Size | Author |
---|---|---|---|
#12 | missing_style_plugin_003.jpg | 149.78 KB | mjhmobilemedia |
#12 | missing_style_plugin_002.jpg | 58.1 KB | mjhmobilemedia |
#12 | missing_style_plugin_001.jpg | 109.09 KB | mjhmobilemedia |
#6 | support-for-derived-calendar-plugin-row-now-1236610-5.patch | 2.49 KB | sukr_s |
#1 | 1236610-allow-inherited-calendar-plugin-row-node.patch | 1.25 KB | sukr_s |
Comments
Comment #1
sukr_s CreditAttribution: sukr_s commentedI've created a patch for the same. will be great if this can be applied.
Comment #2
Todd Young CreditAttribution: Todd Young commentedI am experiencing the same problem. Neither upgrading to all latest DEV's nor the above patch worked for me? I am using yesterday's Alpha-1 release.
Comment #3
sukr_s CreditAttribution: sukr_s commented@Todd: Your issue would not be related to the one for which i've included a patch since I've extended the default calendar pluging of the module and need the core module to support the extentsion.
For you problem you may want to try the following
1. clear all cache
2. clear views cache
3. edit the view and check if the Format is Calendar and Show is Calendar Items
Comment #4
Todd Young CreditAttribution: Todd Young commentedSuccess! After upgrading my SHOW had reverted to 'fields' for some reason - thank you!
Comment #5
KarenS CreditAttribution: KarenS commentedI'm trying to understand the original issue. You mean you have created a custom handler that extends the calendar row handler? For that we can test using is_a or instanceof. See how it is done in the date_views_handler_is_date() function in the Date Views module. We can provide something similar to that in Calendar.
You can rework your patch to use this or I will try later.
I would not characterize this as a 'bug', it is a feature request, but a reasonable one.
Comment #6
sukr_s CreditAttribution: sukr_s commentedKaren,
your understanding is right, i've a custom handler derived from calendar row handler. I've also adopted the patch as per your suggestion to use instanceof. Would be great if you can review and apply the same.
Sudhir
Comment #7
gtrennert CreditAttribution: gtrennert commentedHello,
I get this message too :
'calendar_plugin_style: Missing calendar row plugin'
dans calendar_plugin_style->render() (ligne 205 dans ..\sites\all\modules\calendar\includes\calendar_plugin_style.inc).
The first patch did not change anything
The second one gives me a lot of this messages :
Notice : Undefined index: style_plugin dans calendar_granularity_path() (ligne 197 dans ...\sites\all\modules\calendar\calendar.module).
I followed this step by step : http://drupal.org/node/1250714
Comment #8
bigjim CreditAttribution: bigjim commentedWhile the patch in #6 worked fine for me, I'm wondering why this check is there at all. Why do we care if it's a calendar_plugin_row_node row plugin? I might be missing something here but it doesn't seem to me this style plugin is dependent on the Node entity (other than a few theme naming conventions)? I was able to write a row plugin that works perfectly well on an entity (actually not event an Drupal entity but CiviCRM Events) that uses calendar_plugin_style.
Though I needed to cut that check in the if() statement to make it work (btw my plugin drops all the OG and Taxonomy support, in part not shown in my code).
Comment #9
KarenS CreditAttribution: KarenS commentedThe test for a calendar row plugin is needed because the style won't work at all for other row plugins, like the field plugin or the content plugin. If someone tried to use those row plugins the calendar would have nothing to display (none of the calendar info added by the plugin would be available), and in fact it will start to throw all kinds of errors because values that the plugin should have added are missing. So this is intended to keep users from creating calendars that won't work.
I committed a variation of the patch above, which actually has two different patches and neither is right.
The right test is
rather than
http://drupalcode.org/project/calendar.git/commit/f440bef
If anyone wants to create other row plugins that will work in calendars, you need to extend the ones we have and be sure not to wipe out important values it creates. Currently there is only a node plugin. My plan is to create others, possibly including a generic one for entities that aren't nodes. This is the same way that Views uses the row plugins, they are intended to provide handling specific to a certain type of entity, like the row striping by content type.
In fact, now that this is working fairly well, I may step back and create generic row plugin that would work on any entity type, then have the node row plugin extend that instead. This belongs in a separate issue, and patches are welcome.
Comment #11
johndieter CreditAttribution: johndieter commentedwell, what is the fix? all the latest versions and NO calendar works. row plugin missing...
Comment #12
mjhmobilemedia CreditAttribution: mjhmobilemedia commentedI figured out how to fix this issue, so I thought I'd share how I did it:
The problem is in the Event Calender View. Under Format, change the Row Settings to Calender Item. Under the Settings, I also set Add New Date Link to Event.
You have to do this for each display separately: Month, Week, Day, Year and Block.
Comment #13
KarenS CreditAttribution: KarenS commentedThis is a feature request about extending the plugin, not a bug report about a missing plugin. The feature request was taken care of.
Comment #15
DWyeth CreditAttribution: DWyeth commented#12 fixed it for me - thanks mjhmobilemedia