I have been using Magento2 for quite a few months now and it’s always good to learn new things and share my experience with other developers.
I recently tried to remove an image from a configurable product and I received an error telling me that ‘The image cannot be removed as it has been assigned to the other image role’, it was an odd message because I was sure that I unset that image and set a new image as base, small and thumbnail, however, something wasn’t still right so I did the following to fix this:
Make sure that you are not in the DEFAULT STORE view, if that is the case, please switch to your website store view.
Set another image as Base, thumbnail and small image.
Now you can easily remove the image.
Please share this post with others if the solution worked for you.
After using Magento 1 for a few years, I decided to upgrade one of my clients website to Magento 2 however, it was not an easy task to do as the overall architecture and code base has changed in M2. To be honest, I must say that Magento 2 is much easier to code compared to M1 but it will take a while to understand the structure and code base, and trust me you will face quite a few bugs and errors in the system.
Recently I noticed that on my client’s website, the mini cart stopped working and did not show any products in the popup. As a developer, I knew that the products were added in the system and I tested it by going directly to the checkout page: http://mywebsite.xyz/checkout/cart; so what I did was the following:
Checked System.log and exception.log files
Checked browser’s Developer’s network tabs to read the request/response
Made sure that Magento was up to date because this issue was raised in Magento 2.0 and then Magento fixed it in Magento 2.1
After upgrading Magento, the issue was still there so I did the very basic thing; I made sure that caching was disabled and then enabled it. After I enabled the cache, I realised that some of the blocks were invalidated so I flushed the cache storage and tested everything on the frontend again. Everything was normal and read to deploy to the production website.