Hi there,
I came across a very interesting issue today and I'm wondering if anyone else has seen it. I was setting up a brand new AEM project to test the CIF Magento capabilities with a brand new Magento cloud instance on Magento version 2.4.1. Here's what I did:
- Created a new codebase using AEM archetype 27
- Set up and started a brand new AEM instance on the latest cloud SDK version
- Shut down my instance
- Added the latest CIF add-on for author and publish
- Started AEM back up
- Installed the codebase
- Ensured all my CIF configs were correct
From here, everything seemed to work as expected. I could browse products in author, use them in the CIF carousel/featured category components, etc. I was happy, it really didn't take very long to set up, and everything worked!
From there, we wanted to see what the checkout capabilities were like. So, I decided to install Venia on top of what I'd done in order to get a styled version of a 'real' site that would be better to demo to others. So, I pulled down the latest Venia codebase and installed that on top of what I'd already done. And for a little while, I thought everything worked and I was very satisfied with the whole process. That is, until I attempted to view a page in publish mode and the page blew up on me.
It turns out that in the latest version of the CIF add-on and connector, a new commerce configuration property was added to Enable/Disable the use of UID as a field in Magento. It seems that when Magento 2.4.2 came out, they deprecated the id field in exchange for the uid field. Because I was running Magento 2.4.1, I was seeing an error in the categoryList endpoint because AEM was asking for the uid field.
In digging into the CIF codebase, I can see that the CIF classes should be honoring the flag to disable UID...and in fact, that's the default behavior. I was even able to debug when hitting my OOTB site that I created using the archetype, and I can see that it is honoring the enableUIDSupport flag. However, that's not happening on my Venia site, it's just always enabling UID support even if the flag is turned off in my commerce configuration.
My assumption here is that I have a dependency issue with the CIF components. My first thought was to look at the Venia root pom.xml file to see what dependencies it was using. I tried to update the magento.graphql.version property from 9.0.0-magento242ee to 8.0.0-magento241ee but then other errors started getting thrown.
Does anyone happen to know where this issue would be coming from? Both the Venia project as well as the one I generated are both on core.cif.components.version 1.10.0, which does have support for this flag.
Any help would be greatly appreciated. Thanks in advance!