WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This looks like a great plugin. When creating a new feed, I check the appropriate ExactTarget list(s) in Step 1. Step 2 appears prompting me to select a Gravity Form, but when I choose a form nothing else happens.

My browser inspector was showing the AJAX request to .../wp-admin/admin-ajax.php with a status of 200, but its response content was this:

<br />
<b>Fatal error</b>:  Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in /.../wp-includes/functions.php:1038
Stack trace:
#0 /.../wp-includes/functions.php(1038): serialize(Array)
#1 /.../wp-includes/functions.php(615): maybe_serialize(Array) 
#2 /.../wp-includes/functions.php(805): add_option('_transient_extr...', Array, '', 'no')
#3 /.../wp-content/plugins/gravity-forms-exacttarget/api/ExactTarget.class.php(237): set_transient('extr_attributes', Array, 86400)
#4 /.../wp-content/plugins/gravity-forms-exacttarget/exacttarget.php(1018): ExactTarget->Attributes()
#5 [internal function]: GFExactTarget::select_exacttarget_form('')
#6 /.../wp-includes/plugin.php(405): call_user_func_array(Array, Array)
#7 /.../http in <b>/.../wp-includes/functions.php</b> on line <b>0</b><br />

Any ideas? Thanks.

share|improve this question

closed as off-topic by TheDeadMedic, Johannes Pille, birgire, Pieter Goosen, mrwweb Sep 4 '14 at 22:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – TheDeadMedic, Johannes Pille, birgire, Pieter Goosen, mrwweb
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

It appears that there are some SimpleXMLElement objects in the array that is to be serialized in stack trace above, and as the error says, 'Serialization of 'SimpleXMLElement' is not allowed.' Boo.

I tried to figure out how to modify the response so it replaces all the SimpleXMLElement objects, but this was a pain. I ended up commenting out line 237 of ExactTarget#Attributes() in /gravity-forms-exacttarget/api/ExactTarget.class.php:

// set_transient('extr_attributes', $attrs, 60*60*24);
return $attrs;

I'm not sure why the $attrs need to be stored as a transient. Things seemed to work fine without it being done.

Anyway, this seems to work for me. Any other suggestions?

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.