Post by rocketfoot » Sat Nov 19, 2022 10:13 pm

Hi guys, I have a strange bug I am trying to track down...My 3.0.3.8 site with "Merchant" theme will show drop down carats an other icons sometimes but other time, there are just place holders in there places? I don't change anything or such, just viewing the site! I have asked the theme author several times and he can't figure out what it is either. I've tested on multiple browsers and machines but when they are missing...they are missing on every test. I can see either working or not working but how can they disappear randomly? Can anyone help me out with a fix?

www.wattstruckcenter.com/shop
Image

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by johnp » Sat Nov 19, 2022 10:18 pm

Might be an SSL issue. Your site has SSL but the home page is not under SSL. You've probably got some non SSL content or links on there somewhere. Try why no padlock.

www.whynopadlock.com

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by rocketfoot » Sat Nov 19, 2022 10:23 pm

johnp wrote:
Sat Nov 19, 2022 10:18 pm
Might be an SSL issue. Your site has SSL but the home page is not under SSL. You've probably got some non SSL content or links on there somewhere. Try why no padlock.

www.whynopadlock.com
I'm not sure, I do run SSl on the server. How do I test it out? I'm sorry...I know enough about this stuff just to be dangerous, LOL!

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by rocketfoot » Sat Nov 19, 2022 10:29 pm

I must have replied after you edited...I tested on whynopadlock and it passed with flying colors! And...the carat icons are back! I am confused!

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by johnp » Sat Nov 19, 2022 10:34 pm

The home page is showing as not secure in my browser. Have you set the site to SSL in the admin panel and adjusted the config.php and admin/config.php files?

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by johnp » Sat Nov 19, 2022 10:41 pm

They changing this part in the footer:

Code: Select all

<p id="powered" class="powered">Powered By <a href="http://www.opencart.com">OpenCart</a> Watts Truck Center &copy; 2022</p>
Change to:

Code: Select all

<p id="powered" class="powered">Powered By <a href="https://www.opencart.com">OpenCart</a> Watts Truck Center &copy; 2022</p>
It may or may not be the solution but it's the only unsecured link I can see.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by johnp » Sat Nov 19, 2022 10:43 pm

Odd. It's fine on the home page now.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by rocketfoot » Sat Nov 19, 2022 10:53 pm

johnp wrote:
Sat Nov 19, 2022 10:43 pm
Odd. It's fine on the home page now.
Right! LOL...I haven't changed a thing yet!

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by rocketfoot » Sun Nov 20, 2022 12:33 am

JNeuhoff wrote:
Sat Nov 19, 2022 10:49 pm
You get this error: CORS missing allow origin for the URL https://www.wattstruckcenter.com/shop/, whereas it's working fine for the URL https://wattstruckcenter.com/shop/index ... ommon/home

To resolve it, see e.g. this one:
https://stackoverflow.com/questions/312 ... in-missing
I added this to my .htaccess as per the link and it seems to be working.

Code: Select all

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
    </IfModule>

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by ADD Creative » Sun Nov 20, 2022 3:16 am

rocketfoot wrote:
Sun Nov 20, 2022 12:33 am
I added this to my .htaccess as per the link and it seems to be working.

Code: Select all

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
    </IfModule>
I would fix the actual issue rather than setting that header with a wildcard. It could in theory leave you site more vulnerable to some attacks.

For a start you linked to http://www.wattstruckcenter.com/shop if you post but your config is using https://wattstruckcenter.com/shop/.

You need to check you config,php files all use the correct URL and redirect http to https in your htaccess. Also redirect www. to the URL without www. or vice versa.

www.add-creative.co.uk


Expert Member

Posts

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

Post by Johnathan » Sun Nov 20, 2022 10:52 pm

What's happening is that your site resolves differently for www vs non-www, which means that it is essentially appearing as two different sites. Whatever is declared in the OpenCart /config.php and /admin/config.php files will work normally, and the other version will not.

You need to redirect the one that is not declared to the one that is. Try this code in your .htaccess file:

------------------------------------------------------------------------------
# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
------------------------------------------------------------------------------

If that doesn't work, just Google "redirect www to non-www using htaccess" and you can find variations of that code to try.

Hope that helps

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by rocketfoot » Mon Nov 21, 2022 9:24 pm

my .htaccess.php looks good with https:// but my admin>config.php has this at the top...

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://mysite.com/stuff/acp/');
define('HTTP_CATALOG', 'https://mysite.com/stuff/');

// HTTPS
define('HTTPS_SERVER', 'https://mysite.com/stuff/acp/');
define('HTTPS_CATALOG', 'https://mysite.com/stuff/');
Is that how it should look (actual code has my correct url's)

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by rocketfoot » Tue Nov 22, 2022 1:20 am

Johnathan wrote:
Sun Nov 20, 2022 10:52 pm
What's happening is that your site resolves differently for www vs non-www, which means that it is essentially appearing as two different sites. Whatever is declared in the OpenCart /config.php and /admin/config.php files will work normally, and the other version will not.

You need to redirect the one that is not declared to the one that is. Try this code in your .htaccess file:

------------------------------------------------------------------------------
# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
------------------------------------------------------------------------------

If that doesn't work, just Google "redirect www to non-www using htaccess" and you can find variations of that code to try.

Hope that helps
I tried this but it seems to have messed up my cPanel redirect from /store/ to /shop/

This may actually be what the problem is but I don't know how to fix it and still have people be able to redirect from old bookmarks and links around the internet!

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by by mona » Tue Nov 22, 2022 2:25 am

https is not redirecting
htaccess is not correct ask your service provider - htaccess is server related and their “responsibility” to assist
As Jonathan sais - this has been covered over and over again on the forum with every possibility imaginable - but it is your server that it is talking to - so your service provider can do it for their server correctly first time around

PS is your config.php correct for both admin and root ?
and yes all four lines state https://www.site.com (or without www to match htaccess)

and no that is not what the problem is -
and yes that code is not set up to be for stores in subfolders - it will not work - the code is correct, just not for your store

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by johnp » Tue Nov 22, 2022 7:25 pm

Personally I would bite the bullet and put your new OC where the old one sits. I.e. In /store. It won't take long for the new site to become established. You could use a redirection extension like this one to manage product redirections:

https://www.opencart.com/index.php?rout ... n_id=28756

I would say the setup you have now is unreliable and possibly confusing to the customer. If it were my site I'd be looking at moving OC up to the top level and have it as the only system running the site. With plugins and information pages I'm sure you could.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK
Who is online

Users browsing this forum: lockbox, nonnedelectari, OSWorX and 94 guests