Author Topic: Embed code doesn't work - Solved  (Read 959 times)

Offline Marklawrence

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Embed code doesn't work - Solved
« on: May 30, 2025, 12:41:48 PM »
I updated AbanteCart to 1.4.2 the update critically failed. After that the embeded code wouldn't work no matter what I tried, even rolling back to a fresh install of 1.4.1. When you go to the admin control panel, then select products, then select a product, then get embed code, the preview wouldn't appear. Furthermore if you went to a page with embeds in it and opened dev mode you would get an error.
In Chrome it's:
Cross-Origin Read Blocking (CORB) blocked a cross-origin response.
In Firefox it's:
The resource from was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)

After working on this error for more than I day I figured out the problem. The webserver wouldn't serve index.php as the default index file, so any call to javascript would return 404, which was the wrong file type since it was expecting javascript, and it would get blocked.

The solution is go to the .htaccess file in the root folder of your AbanteCart installation and add this line:
DirectoryIndex index.php

 

Powered by SMFPacks Social Login Mod