I just installed event module on a fresh copy of drupal cvs. I configure new flexinode settings to show events in calendar.

When I create a new flexindoe (generic event) I don't have a date/time for event start and close. See attached screen shot.

Problem existis when I assign page node type to show up in calendar node settings.

Lamp stack
PHP 5.0.4
Mysql 4x
apache 2x

Comments

drewish’s picture

wow, big enough screen shot, had to do some scrolling on my little laptop ;)

just to double check the basics:
* you created the database tables
* you enabled the event module
* you've gone to /admin/node/configure/types and chosen to "show in event calendar" for your sample event node

you mentioned trying it with the page node. can you enable the basicevent module, allow it to be shown in the calendar and see if that works?

drewish’s picture

so i don't cause undue confusion, that should have been table, not tables.

Waldemar’s picture

I experience the same problem. Will try debugging and post again if I can find anything.

gte451f’s picture

Title: Missing event form elements » Basic Event has same problem
StatusFileSize
new81.13 KB

The basic event has the same problem, though I noticed that when I try to create a "Basic Event" and haven't set it to show up in the calendar I get a message telling me to fix that.

Here is a screen shot of creating a new basic event.

Waldemar’s picture

Title: Basic Event has same problem » Needs update

The error has to do with the last checkin on node.module (Rev 1.559), as node_invoke_nodeapi($node, 'form'); is gone now. (The CVS Comment : obliterate nodeapi op form in favor of the forms API's way of doing things. Tested with help from webchick.).

I'll try to fix it and submit a patch if I have time to...

Waldemar’s picture

Waldemar’s picture

StatusFileSize
new2.93 KB

The following should fix JUST THE APPEARANCE of the date fields. The execution and validation of the form is not done correctly, but I don't have time to fix those today :)

Waldemar’s picture

StatusFileSize
new2.96 KB

Sorry about this, ignore the file before. That should be the right one.

drewish’s picture

Status: Active » Needs review
StatusFileSize
new9.54 KB

[Can we try to keep the title set to something useful?]

Waldemar, good catch. I tried to make some improvements on your patch. I updated hook_nodeapi() to accept the current parameters. That then caused some tweaking to get the previewing and ical items working. right. I also removed some duplicate tests and tried to streamline it a bit.

drewish’s picture

StatusFileSize
new9.19 KB

Re-rolling to make sure it applies cleanly.

drewish’s picture

StatusFileSize
new9.48 KB

Looks like I lost a line on that last patch.

drewish’s picture

Title: Needs update » hook_nodeapi -> form_alter
StatusFileSize
new7.18 KB

It looks like drumm committed part of this. I've rerolled my patch to get the rest.

drewish’s picture

hold off on that last patch it lost $node = $form['#node']; which is kind of important.

drewish’s picture

StatusFileSize
new10.95 KB

Okay, here's a new patch based on drumm's changes.

It looks like the hook_nodeapi's execute op is now submit so the patch changes that. I've also added a weight to the timezone so it sinks below the end date.

Along with the previous changes:
* updated hook_nodeapi() to accept the current parameters...
* ...resulting tweaks to get the ical items working
* combined validate and execute cases to get previewing working

Please try it out.

Waldemar’s picture

Thanks a lot for the patch! It works fine so far, but the dates one sets in the node don't get updated (instead the current date and time is taken). I fixed this by adding the following lines:

event_validate_form_date($node, 'start');
event_validate_form_date($node, 'end');

to the top of the event_nodeapi cases 'insert' and 'update'. (The modified node seems to be reset for each case...)

drewish’s picture

Waldemar, you shouldn't need those extra lines. Can you make sure that you're running the latest version of Drupal from CVS?

drumm’s picture

Looks like a good code cleanup +1 (watch out for the DOS line endings when you apply this)

I do see an extra line of commented debug code which should be removed:

//var_dump($op); var_dump($node);
killes@www.drop.org’s picture

Status: Needs review » Fixed

removed debug code, committed.

drewish’s picture

Status: Fixed » Needs review
StatusFileSize
new10.76 KB

drumm, good call on that debug code. i pulled that, clarified a comment or two, and removed a duplicate test in the event_nodeapi 'delete' case.

killes@www.drop.org’s picture

Please re-roll. :p

drewish’s picture

ah, never mind. i'll roll the comment fixes into a patch with some others i've collected.

if you wanted to remove that extra test around the delete case, that'd be good.

drewish’s picture

StatusFileSize
new1.63 KB

since you asked ;)

killes@www.drop.org’s picture

Status: Needs review » Fixed

Thanks. Neil will look at the other two pendign patches later.

Anonymous’s picture

Status: Fixed » Closed (fixed)