I've installed this but get an error as foolows:
warning: Missing argument 1 for petition_menu() in /sites/all/modules/petition/petition.module on line 44.
Also when I try to edit petition settings I get an error:
Fatal error: Call to undefined function crm_uf_get_profile_fields() in /sites/all/modules/petition/petition.module on line 665
Any advice much appreciated
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | petition_civicrmv2_upgrade.patch | 3.54 KB | meecect |
Comments
Comment #1
axbacon commentedSame problem plus
Fatal error: Call to undefined function crm_uf_get_profile_fields() in /modules/petition/petition.module on line 204
when I try to post
Comment #2
peterhessels commentedSame problem: warning: Missing argument 1 for petition_menu() in /home/familiehessels.nl/public_html/drupal-6.15/sites/all/modules/petition/petition.module on line 44.
Comment #3
cybertoast commented+1:
Fatal error: Call to undefined function crm_uf_get_profile_fields() in .../sites/all/modules/petition/petition.module on line 665
Comment #4
edmooney commentedI get the same error when trying to create a new petition:
Fatal error: Call to undefined function crm_uf_get_profile_fields() in /sites/all/modules/petition/petition.module on line 218
Comment #5
meecect commentedI have apparently fixed this. The issue is that the petition module is using the v1 api and needs to use the v2 api. Just switching that function name didn't work because in V2, you also have to include specific api files that define specific sets of functions.
After trying to manually convert the module for a bit, I smartened up and realized that there is a very helpful module out there to assist. It's called civicrm20compat, and it does a lot of the v1->v2 translation for you, meaning you only have to modify a few lines of the petition module to make it work. Get it here:
http://drupal.org/project/civicrm20compat
Then, you need to update the petition module to use it. I have included a patch for the mods, but basically, you (from the civicrm20compat page):
Patch is attached.
Comment #6
that0n3guy commentedafter applying that patch I get blank white screen on node/add/petition and admin/settings/petition
Comment #7
that0n3guy commentedOh i'm retarded... didnt enable the module above (civicrm20compat)
Comment #8
seanrThe reason for the white screen is this here:
That'll obviously throw you into an infinite loop if civicrm20compat isn't installed. That should be doing something other than calling itself. ;-) At any rate, I'd much prefer to actually update the module to use the 2.0 API natively rather than relying on civicrm20compat. Unfortunately, I don't use CiviCRM at all, so I'll need some help with this.