Please note this is a channel-specific article only applicable to Magento 2.


Problem:


a) Some of my Magento 2 SKUs are not receiving stock level or price change updates.

b) Some of my Magento 2 SKUs are automatically getting set to Ignore Sync by the system

c) I am getting an error about forward slash / when trying to create a listing via Linnworks to Magento 2.


Cause:


At present, there is an issue on Magento 2 with SKU's that contain special symbols, such as / and % in the SKU. The problem is that Magento API is not able to correctly parse these symbols during API updates.


When Channel SKUs on Magento 2 contain either or then the SKUs will appear in your Channel Mapping screen and allow you to link them to Linnworks SKUs, but the update syncs done after linking will fail:


  • Magento 2 will not receive stock level updates for the SKUs

  • Inventory syncs in general can fail with an error containing:

    </script></head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> 
    Error retrieving information from server.

    Due to failing syncs, the SKUs will be automatically set to Ignore Sync.
  • Magento 2 will not receive Price updates for the SKUs.


As a precaution, Linnworks Listing Tool for Magento 2, will already display you an error when you are attempting to create a listing containing a forward slash (/). The same check has not been applied to %, but we recommend to avoid using these as well, as it may also cause errors in the syncs.


The matter has been reported to Magento developers already, however, there is presently no resolution to this. These cases have been discussed here:


https://magento.stackexchange.com/questions/142056/how-to-get-magento2-product-with-rest-if-sku-has-slash

https://github.com/magento/magento2/issues/8615


One potential workaround that has been provided by an external source is the following:


It appears that this is an issue with Apache rather than Magento. You might have noticed that the 404 response codes are Apache generated instead of the usual Magento 404 pages. This is because, by default, forward slashes cannot be encoded in URLs without getting rejected. Add the option "AllowEncodedSlashes On" in either your global or virtual host config (or maybe in the Magento .htaccess, though this could be a security risk for users who would never make requests with encoded forward slashes).


Solution:


  • Before using Inventory Mapping for Magento 2, please change you SKUs on Magento backend to not include / or % symbols.
  • When listing SKUs that containing / or % from Linnworks to Magento 2 - edit the values on the listing template before processing, to ensure the Channel SKU would not contain either of the symbols that would break any update syncs.