• Resolved ndna02

    (@ndna02)


    Hi,
    First of all, thank you for the work you have been doing on the plugin.
    I am contacting you because I am having problems pulling any object from salesforce at all.
    I had troubles building a fieldmap in the first place, because the install script failed to create the necessary table (object_sync_sf_field_map), but I looked into the plugin code, and was able to run the query manually.
    I found the following error in my php-error.log : “WordPress database error Index column size too large. The maximum column size is 767 bytes.”

    The fieldmap issue being fixed, I was able to create a fieldmap between my salesforce record and my wordpress object. However, I can’t find a way to trigger the pull event.
    I allowed every triggers, created a pull schedule running every minutes in the schedule tab, used Chrontrol to make sure the chron was actually present, and would even fire it manually, but nothing ever happens.

    No logs in the log posts (despite allowing all logs in the log settings tab), except for /services/data and /describe logs.
    There isn’t any error in my debug.log either.

    I also try adding debug manually to the pull methods inside the salesforce_pull class, and realized they simply never fired. None of the callbacks do.

    Do you have any idea as to what could be causing the issue and where I should look next ?
    Thank you in advance !

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @ndna02 I think it’s possible this could be related to the activation issue you had. I’ve only seen that happen because of MySQL versions, but it’s possible something else is happening.

    But in any case, since you have the tables created yourself, here’s what I would try first:

    1. Make sure the “Delete plugin data on uninstall?” option on the Settings tab is not checked (this will keep the tables from being deleted)
    2. Deactivate the plugin.
    3. Activate the plugin. Make sure there are no other MySQL/other errors happening.
    4. Save the plugin’s schedule settings again just to make sure they are there.

    Then see if these cron events are running.

    Thread Starter ndna02

    (@ndna02)

    Following those steps cause me to not be able to create a fieldmap anymore.
    There is a red alert area on the top of the page, but it is empty (no error message).
    However, I did find the following in my debug.log :

    WordPress database error Table ‘pantheon.wp_challobject_sync_sf_field_map’ doesn’t exist for query SELECT id, label, wordpress_object, salesforce_object, salesforce_record_types_allowed, salesforce_record_type_default, fields, pull_trigger_field, sync_triggers, push_async, push_drafts, weight, version FROM wp_challobject_sync_sf_field_map made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), include_once(‘/plugins/object-sync-for-salesforce/object-sync-for-salesforce.php’), Object_Sync_Salesforce::get_instance, Object_Sync_Salesforce->__construct, Object_Sync_Salesforce->push, Object_Sync_Sf_Salesforce_Push->__construct, Object_Sync_Sf_Salesforce_Push->add_actions, Object_Sync_Sf_Mapping->get_fieldmap

    This is the error I fixed by creating the table manually.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    This would suggest that the plugin deleted the database tables when it was deactivated. In all of the testing I’ve done, at least, it doesn’t delete tables if the “Delete plugin data on uninstall?” is unchecked.

    I can’t tell why it is deleting the tables, but since it is, here is what I would try instead:

    1. Deactivate the plugin.
    2. Create the tables manually.
    3. Reactivate the plugin. Upon activation, the plugin won’t create the tables if they already exist.

    Thread Starter ndna02

    (@ndna02)

    Hi,
    I just followed those steps, but it didn’t fix my issue with not being able to trigger pull. The callbacks are still not firing and I am still not able to get records from salesforce.
    Do you have any idea where I could have gone wrong ?
    Thank you in advance !

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @ndna02 can you tell me what fields you are trying to map? Include what the WordPress object is, what the Salesforce object is, and at least a few fields. So WordPress field, Salesforce field, whether it is a prematch, whether it is a Salesforce key, what Direction it is supposed to go. Also include the action triggers that you have selected.

    I’m also curious if you are able to push from WordPress to Salesforce. If you leave the “process asynchronously” checkbox unchecked, the plugin will send data instantly. If it works like that, but it does not work with that box checked, it would be a cron issue, for example.

    Thread Starter ndna02

    (@ndna02)

    Thank you for the quick response,
    I am trying to pull record objects from salesforce and map them as custom type wordpress posts. (The goal being to add a new post every time there is an object added to the salesforce record)
    The wordpress objects is called “job”
    The salesforce objects is called “Job”
    I allowed every record types, and chose “Create Date” as a date field to trigger pull.

    I have only been trying to fill 1 field, as of now:
    wordpress field : post_name
    salesforce field : vacancy name
    I have tried with prematch both on and off, and didn’t set a salesforce key
    The direction is “salesforce to wordpress”
    At first, I only allowed Salesforce create/update/delete action triggers, but eventually allowed every single triggers, thinking maybe it was my mistake, to no avail.

    I did follow your suggestion to try and push from wordpress to Salesforce, and it worked. I got a success debug post and the object was created in my salesforce record.
    However, when I tried it again and checked the “process asynchronously” checkbox, the record was not created, the action just seemed to stay enqueued indefinitely in the push queue, and it didnt fire, even when I ran the cron manually. I think you were onto something when you suggested it could be a cron issue.

    Thread Starter ndna02

    (@ndna02)

    And it turns out you were right.
    There was a plugin on the wordpress called WP-Cron Control. It was interfering with the cron execution. Once I disabled it, the problem was solved.
    Thank you so much for your help !

    • This reply was modified 8 years, 4 months ago by ndna02.
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Can’t pull objects from salesforce’ is closed to new replies.