WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Gravity Forms Salesforce Add-on
[resolved] [PATCH][2.2.2] Fix issue with "fields" disappearing when trying to wire API up (2 posts)

  1. gmcinnes
    Member
    Posted 3 years ago #

    The symptoms here are that the "fields" disappear when you try to update when mapping API fields to form fields, when using the Salesforce API. You might also see things in your error log like;

    PHP Warning:  Invalid argument supplied for foreach() in /var/www/marscentrephase2.com/releases/20121220185715/wp-content/plugins/gravity-forms-salesforce/salesforce-api.php on line 675, referer: http://marscentrephase2.com/wp-admin/admin.php?page=gf_salesforce&view=edit&id=1&refresh=lists

    For some reason:

    $lists = get_site_transient('sfgf_lists_fields_'.$objectType);

    is returning the stored lists as a String instead of an array, even though it was clearly stored as an array. I'm not sure why that is. I don't know the root cause. I fixed it just by unserializing the string returned by the get_site_transient call. Patch below:

    --- gravity-forms-salesforce/salesforce-api.php	2012-12-20 13:57:14.816234769 -0500
    +++ gravity-forms-salesforce/salesforce-api.php	2012-12-20 17:59:57.210729362 -0500
    @@ -670,6 +670,7 @@
             $listtype = ($listtype !== 'objects') ? 'fields' : 'objects';
    
             $lists = get_site_transient('sfgf_lists_fields_'.$objectType);
    +        $lists = unserialize($lists);
             if($lists && (!isset($_REQUEST['refresh']) || (isset($_REQUEST['refresh']) && $_REQUEST['refresh'] !== 'lists'))) {
                 foreach($lists as $key => $list) {
                     // If you only want one type of field, and it's not that type, keep going

    http://wordpress.org/extend/plugins/gravity-forms-salesforce/

  2. Zack Katz
    Member
    Plugin Contributor

    Posted 3 years ago #

    This will be added in the next release (2.2.3), coming later today. Thanks for reporting.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity Forms Salesforce Add-on
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.