Post by glolar » Mon Sep 27, 2021 4:50 pm

OpenCart 3.0.2.0, Using a ZEMEZ theme.

I am getting the following errors in the Console when I visit my site:

Error 1:
Source map error: Error: request failed with status 404
Resource URL: https://ddecarcare.com/store/catalog/vi ... r/swmin.js
Source Map URL: maps/swiper.min.js.map

Error 2:
Source map error: Error: request failed with status 404
Resource URL: https://ddecarcare.com/store/catalog/vi ... .jquery.js
Source Map URL: maps/swiper.jquery.js.map

I read up on this a little bit. Most of it is over my head, but from what I gather, jquery is trying to read some cookies???

The site, in case anyone wants to visit with their browser tools on, and check the console:

https://www.ddecarcare.com/store/

I updated the setcookie() command in the catalog/controller/startup/session.php to add the 'SameSite=None' parameter, with secure=true and httponly=true. This solved some CORS issues I was having:

setcookie($this->config->get('session_name'), $this->session->getId(), ['expires' => ini_get('session.cookie_lifetime'), 'path' => ini_get('session.cookie_path'), 'domain' => ini_get('session.cookie_domain'), 'samesite' => 'None', 'secure' => true, 'httponly' => true]);

Do I need to set httponly to false so that jquery can do it's thing, or will that cause other issues?

I have this line in the session.php file in other OpenCart 3 installations, and I don't have any issues, but this site does have a different theme than those.

Any help is greatly appreciated!



Any help in resolving these issues would be greatly appreciated.

User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by ADD Creative » Mon Sep 27, 2021 6:07 pm

It has nothing to do with cookies. The web browser developer tool debugger is just trying to load the source code map for the .js files, which don't exist. It will not cause an issue if you are not debugging.

https://developer.mozilla.org/en-US/doc ... source_map

The first one is down to your theme, the second one can probably be fixed with https://github.com/opencart/opencart/pull/9389/files.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon Sep 27, 2021 6:22 pm

Sounds like you should contact the theme developer?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: SohBH and 268 guests