Just got the latest event and event repeat modules, but whenever I try to submit a repeat pattern I get this fatal error:

Call to undefined function event_get_offset() in C:\Apache\drupal\modules\eventrepeat\eventrepeat.module on line 1820.

Looks like that method is used in a couple places. Any ideas?

Thanks

CommentFileSizeAuthor
#10 eventrepeat_includetz.patch623 bytesseanbfuller

Comments

seanbfuller’s picture

Can you confirm that you are actually using the 4.7 version of the event module and the cvs version of eventrepeat? (See the note on the front page of eventrepeat for the current state of the code.)

scottg’s picture

Getting the latest cvs version of event repeat made seemed to make things worse (I couldn't even create a repeat pattern). Went back to the latest 4.7 and poked around a little. Turns out its just missing an include.

include(drupal_get_path('module', 'event') .'/event_timezones.inc');

Seems to work fine now.

Scott

seanbfuller’s picture

When you say you could not create a pattern with cvs, do you mean that the tab was missing or that you got errors? Because in cvs the repeat pattern form was moved to a collapsible field inside the node form.

scottg’s picture

When I opened up an event that I had previously setup a repeat pattern for I saw the new interface (very nice btw). When I tried to create a new event the fieldset was empty. I could only see the Repeat Pattern title, and there was no way to expand it. I'm assuming this is because I'm using 4.7 versions of drupal and the event module, but the CVS version of event repeat.

If these should all work together, I can open up another issue.

Scott

seanbfuller’s picture

No, that is the correct combination right now until we push the code to a new 4.7. There's a chance that it might be because you have old data, and this could be an upgrade issue. I'll see if I can track that down, but in the meantime, if you get the chance and can try again with a fresh event node, that would be helpful.

Thanks!

scottg’s picture

Finally got a change to test this again. I got the latest module from CVS, created a new event node, and I was able to successfully create a new repeat pattern.

Everything looks good.

Thanks

seanbfuller’s picture

Status: Active » Closed (fixed)

Marking this as closed since you got it working.

gaele’s picture

Status: Closed (fixed) » Active

Sorry, had to reopen this. I'm using event 4.7 and eventrepeat from CVS. I could create a repeat pattern, but afterwards setting a Repeat end date caused the error message as mentioned above.

After adding the include to eventrepeat as specified by scottg in comment #2 the error disappeared and everything worked fine.

Please see http://drupal.org/node/66404#comment-107773: "timezone.inc is no longer included by default"

seanbfuller’s picture

Version: 4.7.x-1.x-dev » 4.7.x-2.x-dev
seanbfuller’s picture

Status: Active » Needs review
StatusFileSize
new623 bytes

I'm still not getting this error. I just tested with latest event 4.7 from cvs and eventrepeat 4.7.x-2.x. However, after looking through the code, I do see how eventrepeat could try to call event_get_offset() without the file being included. I've created this small patch which does an include_once on the file.

Up for review.

francisu’s picture

I have successfully applied the patch and tested creating events, and adding an end date to an existing event (with no previous end date) and it works fine for me.

seanbfuller’s picture

Status: Needs review » Fixed

Applied to both 4.7.x-2.x and HEAD

Anonymous’s picture

Status: Fixed » Closed (fixed)