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.
As requested by japerry:
On: admin/conference/events, allow users to determine which event is the default one, and auto populate the node form dropdown with which event is default based off the group gid.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2004080-cod-defaultevent-8.patch | 646 bytes | chrisguindon |
#4 | 2004080-cod-defaultevent-4.patch | 6.58 KB | aburrows |
#2 | 2004080-cod-defaultevent-2.patch | 6.36 KB | japerry |
#1 | cod-defaultevent-2004080-1.patch | 6.07 KB | aburrows |
Comments
Comment #1
aburrows CreditAttribution: aburrows commentedJust uploaded patch, includes new hook for form, flag and views. Off onto plane to London now, so can amend anything when I'm back
Comment #2
japerryGreat work! We're almost there, however this patch doesn't allow you to select one default event. The expected functionality is when one event is selected as default, the other event (previously selected as default) will be unselected.
I've re-rolled the patch to apply cleanly against the latest head. We should be testing against this patch since #1 doesn't apply anymore.
Comment #3
ezra-g CreditAttribution: ezra-g commentedSlightly more descriptive title.
Comment #4
aburrows CreditAttribution: aburrows commentedPatch that uses previous patch and additional rules to fix issue. Please test
Comment #5
aburrows CreditAttribution: aburrows commentedComment #6
japerryadded! well sorta--
After looking at how the flag worked, we decided that it'd be better to make it a configuration option. So now you can configure a default event. If there is only one event, it'll just use that by default instead.
Either way, now when creating a node, you'll not see the group on creation if you have a default set. Of course if you have more than one event, or zero events, you can set the default to be -none-
Comment #7
aburrows CreditAttribution: aburrows commentedHas this functionality been done, or do you want a patch for it?
Comment #8
chrisguindon CreditAttribution: chrisguindon commentedAfter pulling-in the new changes in my sandbox site, I started to see a long list of php errors on some of my views.
Notice: Undefined property: stdClass::$nid in cod_events_views_pre_render() (line 6 of /profiles/cod/modules/contrib/cod_support/cod_events/cod_events.views.inc).
I suggest, we verify the name of the view before we the loop to add '!event (default event)'.
http://drupalcode.org/project/cod_support.git/blob/d957530c599b848ef5b67...
Attached is a patch that does that.
Comment #9
jyee CreditAttribution: jyee commented#8 was committed, but I think we're still not quite fixed on this.
Comment #10
jyee CreditAttribution: jyee commentedMarking as fixed. Changing events via the admin interface is confirmed to work and japerry is currently making changes to set the default event during install.