Posted: January 21, 2018 at 4:18 pm
Hi, We have used the code for tagging a contact in Infusionsoft based on a custom question answer, and it does not seem to be working. Here is a screencast showing everything. How do we get it to tag based on the answer provided in the radio button on the registration form? Thanks, Mike Here is the code we’ve used //assign to group based on the question with admin label “course-materials” /* Stop Adding Functions */ |
|
Hi Mike, Your code is checking for There is a difference between the above two examples. Also, you can verify that:
Lastly, filter hooks should be hooked to with |
|
Hi, The plugin has been active on the site. However I’ve just tried to activate it and it’s coming up with can’t be activated as causing a fatal error. As the plugin is just code is just using sample code from EE, I’m not sure why that would be happening, as it’s been fine. Any thoughts? Thanks, Mike |
|
Hi Mike, I’m guessing the error your getting is something like:
And the reason for that is you’ve changed the code to use a
If I rewrite that just a little so its clear how PHP will parse that:
{variable} {minus} {contstant} Dashes should not be used in variable names as they are used as the subtraction operator, in some case they may appear to be working, say when working with strings, but if you check the error log you’ll see all kind of undefined constant notices. Change any instances of |
|
Hi, Thanks for suggestions. I’ve tried doing as you mentioned, however when trying to activate the plugin, I’m still getting the following message. “Plugin could not be activated because it triggered a fatal error.” Any thoughts on what needs to be changed to be able to have this code activated? Thanks, Mike |
|
Can you post the full updated code ( the full plugin code) you are using to http://www.pastebin.com and post the url here for us to view. Also if you look at your server error log you see the full error thrown. Can you post that please. I’m not getting any errors after I fix the above on the code you posted so need the above.
|
|
Hi, Here is the pastebin url. Where do I find the error logs? Thanks, Mike |
|
You haven’t fixed the code I mentioned above.
Please fix your variable names before you continue as its likely the cause of the errors. FOr the error logs you’ll usually have a section in your hosts control panel to view logs or look for an error_log file on the server. |
|
Hi, Ok, so I’ve fixed those items, and now I got the following issue Fatal error: Cannot redeclare ee_infusionsoft_save_my_custom_questions() (previously declared in /nas/content/staging/teo/wp-content/plugins/aw-teo/aw-teo.php:1039) in /nas/content/staging/teo/wp-content/plugins/gbf-admin/gbf-admin-custon.php on line 30 So there is some sort of conflict I’m guessing with the code at line 1039 in the aw-teo.php plugin. The code on this line is “function ee_infusionsoft_save_my_custom_questions( $is_contact_data, $ee_attendee ) {” Do I need to change the code in my gbf-admin-custon plugin to fix the conflict? Hopefully, we are getting closer to resolving the issue. Thanks, Mike |
|
You can only have one function with that name, otherwise, PHP doesn’t know which function it should use when you call it. So you can either, add your additional code to the |
|
Hi, So I’ve put the code into the at the bottom of the aw-teo.php plugin, and removed it from the gbf-admin-custon.php plugin and I’m still getting a similar error. Fatal error: Cannot redeclare ee_infusionsoft_save_my_custom_questions() (previously declared in /nas/content/staging/teo/wp-content/plugins/aw-teo/aw-teo.php:1038) in /nas/content/staging/teo/wp-content/plugins/aw-teo/aw-teo.php on line 1077 Thanks, Mike |
|
Because you still have the original function with the same name, as mentioned above, you can’t have 2 functions with the same name as PHP doesn’t know which to run. So you either combine the 2 functions together or rename one of them. Right now you’ve moved the new function into the same plugin as the old one, they both still have the same name so still cause the same problem. |
|
The support post ‘Infusionsoft Tagging Based on Custom Question Answer’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.