I upgraded from drupal 4.7.8 to 5.3 last week without any problems. All my modules upgrades were fine after running the database upgrade scripts except this one. I was able to run the database script smoothly but unable to get the content of the advpoll node besides the comments of the node. Even going to the edit forms I get a warning:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'advpoll-binary_node_form' was given in /drupal5/includes/form.inc on line 218.

I don't know where to start as my php skills are so limited.

CommentFileSizeAuthor
#6 advpoll_upgrade.patch822 bytesChrisKennedy

Comments

ChrisKennedy’s picture

As our project page states, Drupal 4.7 is no longer supported, which is what happens when you wait a year to upgrade. But I'm a little interested in this because it is strange.

Advanced Poll was forked from Decisions on Oct. 28, 2006 and by Nov. 6 we had ported to the yet-to-be-released Drupal 5 and stopped any new feature development on 4.7. So really Advpoll was only developed for Drupal 4.7 for a week-long period, which is why we didn't care about migration code. Unfortunately for us we switched too early because Drupal 5 wasn't even released until mid-January 2007.

Anyway, the error you're getting is due to the Drupal 5 migration commit made on Nov. 5, 2006.

Run these two commands on your database and let me know if they fix the problem:

UPDATE node_type SET type = 'advpoll_binary' WHERE type = 'advpoll-binary';
UPDATE node_type SET type = 'advpoll_ranking' WHERE type = 'advpoll-ranking';
jmai’s picture

the type are already advpoll_binary and advpoll_ranking so the above commands didn't do anything.

ChrisKennedy’s picture

Oh I should have written this:

UPDATE node SET type = 'advpoll_binary' WHERE type = 'advpoll-binary';
UPDATE node SET type = 'advpoll_ranking' WHERE type = 'advpoll-ranking';
jmai’s picture

Yes that did it. It works now. thank you ChrisKennedy

ChrisKennedy’s picture

Assigned: Unassigned » ChrisKennedy
Priority: Normal » Critical
Status: Active » Needs review

Okay here's a patch to add it to the list of updates.

ChrisKennedy’s picture

StatusFileSize
new822 bytes

Okay here's a patch to add it to the list of updates.

anders.fajerson’s picture

Hmmm, if this is for upgrading from 4.7, does it have to be in it's own update function, can't we just put it in update_1?

ChrisKennedy’s picture

imo it's cleaner to put it in a separate update. Anyone who has already upgraded (e.g. jmai) can fix any broken advpoll nodes without having to manually run update #1 and all following updates (most of which will generate errors if they have already been run).

anders.fajerson’s picture

Status: Needs review » Reviewed & tested by the community

Ok. In that case it's ready.

ChrisKennedy’s picture

Status: Reviewed & tested by the community » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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