Comments

dpi’s picture

You could not have separate registrations per repeated date per entity. Thats not how Registration works

I have some thoughts on how this could be accomplished, but it would be an *extreme* hackjob.

Going by #298122: Integrate Signup with the Date Repeat API, this is not an easy feature to implement.

How would you expect this functionality to work?

What is the downside to cloning an entity for each date?

mstef’s picture

I know it's really difficult - certainly explains why no registration-type module has supports repeating dates yet. I really don't know how the approach would work; I just thought I'd ask to see if you thought about it at all..

The downside to cloning, would be that you sort of lose the benefits of having a single entity with repeat dates, so if you want to make edits or deletes, you then have to do it across all of the cloned nodes.

dpi’s picture

Heres how I'm envisioning this could work:

  1. Add date field to event entity (eg: entity_type: node, bundle: event)
  2. Configure date field for date repeat.
  3. Add date field to a registration type. Perhaps an instance of the same date field, but without date repeat.
  4. A new form is exposed on field settings for date on registration type. Configure to only allow field data to be one of the date repeat dates in event date field. (Select form element).
mrpauldriver’s picture

I wonder if the two of you are talking at cross purposes.

Mike appears to be talking about repeat date nodes which contain a registration field - as also discussed here http://drupal.org/node/1489634

dpi, you appear to be talking about pre-populating repeating nodes with registrants from an earlier repeat date sequence.

Either way you are both right - this would be extremely valuable functionality.

For Mikes' proposal to work, we need to a module to create repeat event nodes, which currently we don't have.

As for your suggestion dpi; what could be done on the meantime is to devise a helper module which pre-populates an entity with potential registrants based on authenticated users (or other roles), previous registrants of selected registration entities, or more generally an email database. Later, when it becomes available you can then add previous registrants of a repeat date sequence (going back (n) repeats).

This 'prospect list' would probably be represented as a 'state' called prospects or invitees. Further integration with the broadcast component (or mailchimp module) would allow the content owner to invite prospective registrants to register. Didn't levolos write the mailchimp module?

dpi? What is the correct procedure for presenting a feature request which would be a contrib module? Suggested name space registration_prospects This would need to be compatible with multiple registration types which we are discussing at http://drupal.org/node/1565504

mstef’s picture

I decided to take this up myself. Instead of trying to create a solution where modules like this can provide X registrations per-node, I thought the best way would just to be create something to duplicate nodes based on criteria (every day, every week, every 2 days, etc, etc). There are a few modules that try to do that, but most of them are either dead, broken, or only for D6. I'll be adding it as a contrib in the next few days.

mrpauldriver’s picture

Sounds interesting Mike, please keep me posted

mstef’s picture

I've been on like 10 separate issues tied to this basic concept - i'll post a link to the project page on all of them once I can get it on here.

dpi’s picture

My proposal involves no cloning of entities.

It simply allows registration entities to contain a date field, where the only valid values are those date repeat values found on the host entity.

mstef’s picture

I would definitely prefer that.. too late my for current case though. Have you started anything?

dpi’s picture

I was waiting on feedback, and better ideas, before I started.

I could probably get something worked out by the end of the week, unless you're feeling charitable?

mstef’s picture

I wish, but I'm swamped. And I already went off creating what I described due to the ease of it. I'll be contributing that soon. Sorry!

dpi’s picture

I have committed some code in -dev that I need some feedback on.

To test:

  1. enable registration_date_repeat module.
  2. add a date repeat field to a host entity type
  3. add a date (non-repeat field) to a registration type. In field settings, set which field you wish to source the repeat data from. Then edit field widget settings and set to 'Date Repeat for Registrations'.
  4. create an entity, and change the date repeat field value.
  5. the registration form should now show a select form listing valid dates from the associated host entity date repeat field.

I don't have the time to test this right now, so it would be great to hear if it did or did not work for you. Otherwise I'll just remove it entirely.

edit: added missing step

dpi’s picture

StatusFileSize
new204.5 KB

Attached example

mstef’s picture

Looks interesting. Nice work. I'll test it out as soon as I can.

mrpauldriver’s picture

Initial feedback.

A couple of errors on creating new registration content type.

1. New content type
2. After adding a registration field (but before adding any date fields) to a new content type I get the following error...
Warning: Invalid argument supplied for foreach() in element_children() (line 6244 of /home/xxx/public_html/xxx/includes/common.inc)

3. Upon adding a repeating date field to the content type and attempting to say then save I get

'registration_date_repeat_host_repeat' widget should be attached to 'registration' entities only. node:dated_event are not acceptable.
Notice: Undefined index: #field_parents in field_widget_field() (line 543 of /home/xxx/public_html/xxx/modules/field/field.form.inc).

4. Unable to save the date field

-----

Because of the errors I am unable to evaluate further at this stage.

Questions:
1. Does your repeat structure allow for repeats on a given day? - e.g. repeat on first Monday every month
2. If so, does it allow for combinations? - e.g. e.g. repeat on first monday and 3rd monday every month
This is really quite important functionality, as available in the Date module

Suggestion:
For control over open dates and closing dates for registrations. Might it be simpler to have opening and closing date (n) days before the event date? This would allow for just one date field to be added to the entity and would be in most use cases more in keeping with the actual workflow for repeating events.

e.g.
Opening date for registrations (14 days) before entity date
Closing date for registrations (1 day) before entity date

As I've said before I'm not a tech - but I am event organiser

mstef’s picture

This is pretty unrelated, but since Paul reminded me about it, I thought I could bring it up here..

Close dates are missing timezone support. My site timezone is EST. I realized people were creating "events" on my site in California that took place at 5PM PST and settings them to close at 4PM. The database then contains 2012-05-02 16:00:00, which registration_status() will interpret as 4PM EST -- causing the event to close 3 hours earlier than it should.

dpi’s picture

Hi Paul,

Thanks for the feedback. Please update to latest dev as there may be some fixes in there for you.

After adding a registration field (but before adding any date fields) to a new content type I get the following error...
Warning: Invalid argument supplied for foreach() in element_children() (line 6244 of

I'll assume you get this error on the registration settings page for an entity.

This may be caused by not running the update script. A configuration change happened recently, and this may be the cause. Please ensure you run the update. If this does not work please uninstall and install again.

Upon adding a repeating date field to the content type and attempting to say then save I get

'registration_date_repeat_host_repeat' widget should be attached to 'registration' entities only. node:dated_event are not acceptable.

In comment #12, please read the third step. The error message is correct. You must change the widget for the date field that is on your registration entity. Not the node, which would be the date repeat field.

In addition to this, please go to the date field settings (on registration entity) and set which field you want to source the repeat data from.

1. Does your repeat structure allow for repeats on a given day? - e.g. repeat on first Monday every month

It will take whatever values the date_repeat_field module spits out. See attachment on comment #13.

2. If so, does it allow for combinations? - e.g. e.g. repeat on first monday and 3rd monday every month
This is really quite important functionality, as available in the Date module

See above, I'm not sure that date_repeat supports this kind of combination. You'll have to consult them, or if you know of a method please let me know and I'll look into it.

opening and closing date (n) days before the event date?

Offsets are on my to-do list. #1579762: Add offsets

mrpauldriver’s picture

All good stuff.

A bit whacked after today but hope to find time mañana

mrpauldriver’s picture

The open and closing date stuff all seems to be working as it should.

I am having problems through with the date repeat module.

When I add a repeating date field I get the following error in the field settings.

'registration_date_repeat_host_repeat' widget can only attach to 'registration' entities. 'node' (dated_event) is not an acceptable entity type.

To clarify, this entity already has a registration field.

dpi’s picture

Close dates are missing timezone support.

@mikesteff Please pull down latest dev. Theres a timezone commit in there. TZ stuff is always tricky for me.

Let me know if it works. If not, please post a new issue with this template: http://drupal.org/node/1585476.

When I add a repeating date field I get the following error in the field settings.

@Paul

Please re-read comment #12. Go to your registration type (/admin/structure/registration/registration_types) and add a date field to it. You should now have two date fields on your site. One is a date field (with repeats), on the host entity type. In your case "'node' (dated_event)", the second should be on the registration type you are using for this 'dated_event'.

Then change the widget for the date field on registration type. NOT the date repeat field on host entity (node:dated_event)

mrpauldriver’s picture

I'll come back to your point re #12, I need to re-read your notes and test again.

In the meantime, the error mentioned in #15 seems to persist.

Warning: Invalid argument supplied for foreach() in element_children() (line 6244 of /home/xxx/public_html/xxx/includes/common.inc).

This appears upon selecting the register tab (path - node/*/register) of a registration entity, regardless (I think) of any date settings.

The error clears when registration_date module is disabled

mrpauldriver’s picture

StatusFileSize
new46.32 KB
new19.99 KB
new27.31 KB

Okay back to #12. Still with problems. I think I have followed your instructions correctly.

Please check that I have set up my content type and registration type properly - screenshots 1 & 2.

The third screenshot shows the resulting error

dpi’s picture

#21: Lets try the new -dev

#22, file 3: So thats a new error. You're getting this when you saving registration settings. Does this error persist when Registration Date is enabled? Googling this error brings up a whole bunch of Date module issues.

mrpauldriver’s picture

#21: This error seems to have gone away with latest dev. No testing as such, I just reviewed the same node that was showing the error before and the error message is no longer present.

#22: Yes this error does persist when Registration Date is enabled. Moreover, after installing the latest dev the date widget does not display at all under the register tab, although the correct dates are displayed in the node and under the repeat dates tab. See screenschots. After disabling registration_date_repeat the date selector becomes visible.

#24: A general suggestion regarding the repeat date widget. I think this should be a select list (or radios/checkboxes) limited to the repeat dates of the entity. The Day/Month/Year selector is confusing because one has to refer back to the date repeat sequence and it does not allow for multiple selections. Moreover, it also seems to allow me to register for dates which are not part the repeat date sequence. (excuse my enthusiasm if this is a work in progress)

mrpauldriver’s picture

StatusFileSize
new8.27 KB
new10.76 KB
new9.45 KB

Sceenshot probs - trying again

dpi’s picture

If you do not see a widget, it is because you have not mapped the date field (registration entity type) to the date repeat field (host entity type). Go to bottom of the date (registration) field settings page and configure this.

Previously if no repeat dates were found it would also not display a widget, I have fixed this today.

I have tested all this on a fresh install of Drupal, and works as I intend it to.

mrpauldriver’s picture

Agree, this all seems to be working better and you were of course right about mapping the date field.

The repeat date error first mentioned in #22 and also copied below persists

Warning: implode() [function.implode]: Invalid arguments passed in form_error() (line 1616 of /home/billboar/public_html/bcf3/includes/form.inc).
mrpauldriver’s picture

StatusFileSize
new24.56 KB
new23.73 KB

I just did some further testing for a repeating date entity allowing multiple date selections.

The registration appears to confirm the dates chosen, however the edit screen does not appear to preserve the chosen dates.

See screenshots.

dpi’s picture

I have not tested where Registration date field cardinality > 1.

It appears that the data saves, but you cannot see your saved date when you edit it next time.

I'll look into it, thanks.

dpi’s picture

Status: Active » Fixed

Fixed in 7cd8e1ff646449aa5ce74abed7620d13e23d07e5. Thanks.

I think all major issues with this functionality have been covered. Moving to fixed.

Please report bugs in a new issue.

mrpauldriver’s picture

good work

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

arunjinju’s picture

Category: feature » bug
Status: Closed (fixed) » Active
StatusFileSize
new45.73 KB

hi,
I wanted to create a repeating date event registration.
I followed the steps mentioned in Comment #12 and I am getting error on register page.

Notice: Undefined property: Registration::$entity in registration_date_repeat_field_widget_form() (line 40 of /Applications/MAMP/htdocs/calendar2/sites/all/modules/registration_date/registration_date_repeat/registration_date_repeat.module).
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7693 of /Applications/MAMP/htdocs/calendar2/includes/common.inc).

Modules I used:
Registration 7.x-1.2
Registration Date 7.x-1.0-alpha2

on Drupal 7.23

Please help.

mrpauldriver’s picture

Just revisiting this now and finding difficulty getting it to work. I know there were big changes in the registration module between 7.x-1.1 and 1.2 and wonder whether this has resulted in changes which prevent the repeat date registration functions working.

- I am seeing that both the host entity type and the registration type are showing a select form listing valid dates from the associated host entity date repeat field. I am puzzled as to why the host entity type would show this.

- When I select a date field for the host entity, it is not saved.

- When I attempt to make a registration I get a generic (non drupal) error as below

---
Error
The website encountered an unexpected error. Please try again later.

EDIT
---

STARTING NEW ISSUE

idebr’s picture

dat deaf drupaler’s picture

Thank you, thank you @idebr!!

I have been wrestling with this for quite some time. With new patch provided in #35 above, I am now able to do this together with date repeat entity module to attach registration entity to individual date entity (node) generated via repeat date api.

avo webworks’s picture

@dat-deaf-drupaler could you share how the steps on how you did this with the date repeat entity module?