Post by jcsmithy » Tue Jun 21, 2011 7:16 am

Ok, so I edited the DB query log to generate a new file rather than over write the old, and this is what I've discovered...

Loading a category page, each log returned these PAGE URLS...
  • _route_=reptile/health --- Log size: 124kb
  • _route_=reptile/fancybox/fancy_shadow_nw.png --- Log size: 89kb
  • _route_=reptile/fancybox/fancy_shadow_se.png --- Log size: 89kb
  • _route_=reptile/fancybox/fancy_shadow_n.png --- Log size: 89kb
  • _route_=reptile/fancybox/fancy_shadow_s.png --- Log size: 89kb
  • _route_=reptile/fancybox/fancy_shadow_sw.png --- Log size: 89kb
  • _route_=reptile/fancybox/fancy_shadow_w.png --- Log size: 89kb
  • _route_=reptile/fancybox/fancy_shadow_e.png --- Log size: 89kb
  • _route_=reptile/fancybox/fancy_shadow_ne.png --- Log size: 89kb

Clearly obvious what's causing it!

Question is... how on earth can an image make everything reload the page lol?


Basically, I see two more bugs here as it stands..

Firstly, the paths for the fancybox images listed above are infact wrong, in the css there listed as 'fancybox/fancy_shadow_*.png', these should infact just be 'fancy_shadow_*.png'.

Secondly, these are being seen as SEO urls I presume, so OC is trying to decode them

I've got round the first by fully hardcoding the url in the file, but needs a better solution, and the second is just out of my depths....
Any solutions?

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by Xsecrets » Tue Jun 21, 2011 9:50 am

well the problem is that you have some sort of kinda route= even though it's _route_= Not sure where the heck that comes from, but that is forcing things back through the system and messing things up. an image call should just be domain.com/path/to/image.jpg not domain.com/index.php?route=path/to/image.jpg that is going to cause many problems. my guess is that something somewhere has a character that is not being handled properly so everything is freaking out from there.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Daniel » Tue Jun 21, 2011 12:47 pm

has anyone tried to add a index to the tag filed in the db?

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Tue Jun 21, 2011 2:07 pm

more like missing files from fancybox. reupload.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by jcsmithy » Tue Jun 21, 2011 4:39 pm

Daniel wrote:has anyone tried to add a index to the tag filed in the db?
If you read the post - I have already
Daniel wrote:more like missing files from fancybox. reupload.
Again, as said - just the path's to the images are incorrect in the CSS file, the files are there - just correcting this doesnt solve the problem with SEO though

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by Xsecrets » Tue Jun 21, 2011 9:34 pm

jcsmithy wrote:
Daniel wrote:has anyone tried to add a index to the tag filed in the db?
If you read the post - I have already
did you add an index to the product_id field like I suggested, or to the tag field?

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by jcsmithy » Tue Jun 21, 2011 10:04 pm

Bugger it... seems it was me that didnt read the post properly!

Sorry, I added the index to the product_id, not the tag column... I'll look now.


Don't blame me, blame the lack of coffee first thing at work this morning!

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by Xsecrets » Tue Jun 21, 2011 10:44 pm

I don't know if I would test indexing the tag field on a production server though. It shouldn't hurt anything with your amount of products, but some people that table will be huge. For instance if they had 17,000 products like you, but each product had 10 tags then that's 170,000 tags in that table. Plus in general when you are doing like searches in my experience an index on a text field doesn't help too much. You have to go to fulltext indexes, and that's a whole other issue since you have to change the queries up and everything to utilize fulltext indexes.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by arnisraido » Mon Jan 20, 2014 12:48 pm

Try to replace

Code: Select all

p.date_available<=NOW()
with

Code: Select all

p.date_available<='".date("Y-m-d")."'
This really helped for me!

http://forum.opencart.com/viewtopic.php?f=20&t=118051

Newbie

Posts

Joined
Mon Aug 27, 2012 11:24 pm
Who is online

Users browsing this forum: No registered users and 47 guests