Here's the patch in #8 rerolled for Gutenberg 3.0.
We've been running that patch for ages now.
Scratch what I said above. We're now seeing that this event isn't invoked for many of our of orders. Looking at the code I'm thinking that this is because these are orders where the user isn't returning to the website and thus onReturn() is not called, and therefore not this event either?
I'm thinking that this event needs to be invoked from onNotify() as well? But I feel like I've overheard that you're not supposed to save the order in onNotify()? And we're currently using this event to fetch address information from Vipps and save to the billing profile.
I need some insight from someone more knowledgeable than me on this :)
We've been running this on a client for about a week now, and it's been working great for us.
We have an issue where about 4-5% of orders have no address information, which we don't know the cause of, but I'm leaning towards this just being a problem with off-site payment methods, rather than a problem with this particular implementation.
I realized PHPStorm rewrote the error code comparison to be strict, but getCode()
apparently returns a string so I reverted that change, and attached an updated patch.
Patch attached.
Edit: I see merge requests are recommended now, but I have no idea how to do that. Maybe in the future...
Upgraded core and all modules to the latest versions on the site I'm working on, and the patch in #9 stopped working. Not having the patch still causes the same error as described in the issue description when trying to select section layout. The patch in #10 was a drop-in replacement for the old patch, and fixes the error just like the previous patch did.
I'm not using the https://www.drupal.org/project/lb_ux → module though so the issue title is not what applies to me at least. I do think I may have evaluated lb_ux at one point, so maybe I ended up taking some of the functionality from it and putting it in a custom module instead. So it may very well be that I'm still doing something similar as that module did.