- Issue created by @gcb
- 🇺🇸United States gcb
We can fix by getting more clever with our check, or by making the Rest object generally respond better to isset checks, which seems like a better general solution.
- Status changed to Needs review
10 months ago 4:52pm 29 March 2024 - 🇺🇸United States RoloDMonkey
I was experiencing this issue and the patch fixed it. This is probably only happening because I am running PHP 8.2+.
I also agree that this might not be the best long-term solution
Here is a link to the quirk mentioned in the summary.
https://www.php.net/manual/en/function.empty.php#:~:text=named%20arguments.-,Note%3A,-When%20using%20empty - 🇺🇸United States gcb
It happened for me on PHP 8.1! I was suggesting this solution is better than changing the "isset()" check to something else, actually, and that this was indeed a good long-term solution because it makes our object behave as intuitively expected, rather than simply avoiding the confusing behavior and leaving the trap in place. It's possible we need to implement this function in other objects as well, though.
- 🇮🇳India ankithashetty Karnataka, India
Thanks for the patch @gcb!
Able to see the mappings on UI after the patch.The only thing is, even if we select one record type to pull from Salesforce, it pulls in all the record types, not just the one I selected.
Any way to handle that?Thanks again!
- 🇺🇸United States gcb
@ankithashetty I haven't experienced that bug, but it sounds like it merits its own ticket. While it is related to the same feature, it is not related to the same bug: this ticket was just for the form not being able to list the record types anymore. As far as I can tell, nothing about this code has caused any new bugs.
Please provide more information in that ticket if you can, as I'm not able to get a reproduction. Can you tell us what the "conditions" property on the Soql query are when it is dispatched to Salesforce in `\Drupal\salesforce_pull\QueueHandler::getUpdatedRecordsForMapping` for example? And share the mapping configuration yml file? Adding those to your new issue will help us reproduce the bug.