Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix missing Record Type when pulled from Salesforce. Thanks to @timnolte for the report. #419

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

jonathanstegall
Copy link
Member

What does this Pull Request do?

This fixes #418.

After upgrading to the 2.x version of the plugin I have found that specifically in the case where I have multiple mappings for a Salesforce Object to a WordPress Object, because of multiple Salesforce record Types, that when those records from Salesforce are being processed the resulting WordPress Post Type ends up being set as post, when logs and debug processing indicate that it should have created a Custom Post Type (e.g. sf_industry_location). I verified that reverting back to the 1.9.9 version of the plugin restored the proper WordPress Post Type is created.

How do I test this Pull Request?

  • Setup 2 or more Fieldmappings to the same WordPress Custom Post Type against a Salesforce Object with multiple record Types. (1 mapping per record type.)
  • Modify or create one of those records in Salesforce.
  • Wait for the WordPress instance to pull the Salesforce change.
  • Observe that a standard WordPress post is created and not the Custom Post Type specified in the Fieldmapping.

@jonathanstegall jonathanstegall added the bug fix Pull request that fixes a bug label Sep 8, 2021
@jonathanstegall jonathanstegall added this to the v2.0.3 milestone Sep 8, 2021
@jonathanstegall jonathanstegall self-assigned this Sep 8, 2021
@jonathanstegall jonathanstegall changed the title Fix missing Record Type when pulled from Salesforce. Thanks to @timnolte. Fix missing Record Type when pulled from Salesforce. Thanks to @timnolte for the report. Sep 9, 2021
@timnolte
Copy link

@jonathanstegall FYI, this changes fixes the issue. If there is any chance you could get this into 2.0.3 yet today that would be amazing. Upgrading to 2.x, disregarding this issue atm, fixes another blocker I'm hitting with 1.9.9 right now.

@jonathanstegall jonathanstegall merged commit ddcf497 into master Sep 10, 2021
@jonathanstegall jonathanstegall deleted the 418-ignoring-sf-record-type branch September 10, 2021 18:22
@jonathanstegall
Copy link
Member Author

@timnolte For sure, I'll try to get that released shortly.

@timnolte
Copy link

@jonathanstegall actually, no rush. I'm just going to apply a patch upon install of the plugin until you are ready to push out a release. That way you have time to include anything more before another release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug fix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WordPress Post Type in Fieldmapping Not Creating Correct WordPress Post Type in 2.x
2 participants