Jump to content

[SOLVED] Anyone Know What's Causing These 404 Errors?


Recommended Posts

Hi All

 

Everything seems to be working on this 1.5.2.0 version shop but then randomly, when a customer clicks on a product or category, the URL bar will display something similar to the following and end up in a 404!

 

"http://mysite.com.au/index.php?controller=43-some-product/&selected_filters=&selected_filters=?selected_filters=&selected_filters=&selected_filters=&p=3"

 

I'd really like to find out what's causing this.

 

Thanks

deepee

Edited by deepee (see edit history)
Link to comment
Share on other sites

Thanks Nemo1 but I don't have Block Layered installed.

URL rewriting is supported in my server environment but I have had constant issues with it since upgrading to 1.5.

 

I have had to modify .htaccess as the autogenerated .htaccess rewrites randomly cause the destination URL's to result in unresolvable loops.

"http://www.prestashop.com/forums/topic/209598-solved-canonical-url-issue-with-friendly-urls-in-152/page__p__1034727#entry1034727"

 

I don't know how many customers we have lost since going to 1.5 but I have to keep checking to see if the site is broken again.

I then have to turn off friendly URL's and turn the back on again. Then I have to replace the regenearated .htaccess and the modified one.

It's driving me nuts and losing us business.

 

Any pointers you would recommend towards finally resolving it would be gratefully received (and preserve my fragile sanity)!

 

Thanks

deepee

Link to comment
Share on other sites

I see. That custom htaccess might be the issue then, as I've never seen a product url like that. You might try reuploading the core files of a fresh install and see if that solves the rewriting issue. In the end, if you're loosing too many customers you should turn them off, backup your site to a temporary server and try to fix the issue there.

Link to comment
Share on other sites

O.k thanks, I guess I'm going to have to go down that path.

 

Got another one of these earlier today and this string apended itself to the actual URL: "&?selected_filters=&"

I'd love to know what selected filters it refers to and what generates it?

Link to comment
Share on other sites

Thanks Nemo1 you have given me a better understanding of the issue.

 

Having done more testing, it turns out the issues are not entirely random.

For instance this dummy URL is an example of what's happening:-

 

"http://mysite.com.au/39-some-existing-product/some-old-discontinued-product.jpg?selected_filters=some-old-discontinued-product.jpg"

 

For some unknown reason, old product image URLs are apended to some current product URLs and category URLs.

 

Given that I have blocklayered module disabled I can't understand what's going on.

 

Are these invalid links (that I assume have been generated by a faulty swiitch for enabling/disabling blocklayered module) stored in a cache or in the database?

 

I really need to find and manually remove them.

 

I should mention that this is happening with both the autogenerated .htaccess and my custom one. The autogenerated .htaccess does not contain any other apended code.

Edited by deepee (see edit history)
Link to comment
Share on other sites

Hi deepee, whithout looking at your real site it is really hard to follow your problem.

I have a normallly configured shop and can confirm that assuming server and shop are configured correct, there should not be such errors but I rembember also another member with really strange behaviour and from looking at her site it looked like she was using a totally incompatible template.

Good luck, trip

Link to comment
Share on other sites

Thanks for the feedback Trip but I'm using the default Prestashop template.

 

However I can now see that the problem is caused by a default entry in Preferences > SEO & URLs "Schema of URLs" Tab as follows:-

 

Route to category with attribute selected_filter for the module block layered: {id}-{rewrite}{/:selected_filters}

 

If I remove the value "{/:selected_filters}" the page load errors I have been experiencing are gone.

 

However I've now got a permanent error notification at the top of the Preferences > SEO & URLs page that says:

Keyword "{selected_filters}" required for route "layered_rule" (rule: "{id}-{rewrite}")

 

Given that I have layered navigation disabled and I haven't touched Prestashop's default settings for URL Schemas, any idea why I'm getting these errors and how I can permanently fix them?

Link to comment
Share on other sites

Thanks Bill, that was the information I needed. Those invalid redirects have finally disappeared.

 

What I did:-

1. Uninstalled the Layered Navigation module

2. Cleared the Smarty cache

3. Regenerated .htaccess by switching off Friendly URLs and Canonical URL options and switching them back on again

4. Cleared my browser cache

 

This tested fine except the autogenerated .htaccess canonical URL setting still doesn't redirect anything other than the root URL.

Browsing any category or product with www results in 404s.

I re-instated my custom .htaccess and now everything seems to be working.

 

I'll mark it as solved but it's really just a workaround for some buggy code.

 

Thanks to all for your input!

 

deepee

  • Like 3
Link to comment
Share on other sites

  • 2 months later...

I know this topic says [solved] but I am experiencing the same exact issue and rather than start a new topic I figured I would reply here.

 

I've tried all the methods deepee has shown but I'm still getting the same BAD redirects. I have uinstalled and deleted the BlockLayered module, emptied my smarty cache, and recreated the .htaccess. It seems to work for a little while but then the issue shows up again.

 

Can someone please help or should I report this as a bug?

 

Thanks!

Alex

Link to comment
Share on other sites

  • 1 month later...

Hi @deepee, i want to ask you if you have fixed this issue so:

 

What I did:-
1. Uninstalled the Layered Navigation module
2. Cleared the Smarty cache
3. Regenerated .htaccess by switching off Friendly URLs and Canonical URL options and switching them back on again
4. Cleared my browser cache
 

 

or you have fix this issue also editing the new .htaccess like that: http://www.prestashop.com/forums/topic/209598-solved-canonical-url-issue-with-friendly-urls-in-152/?p=1034727&do=findComment&comment=1034727

 

 

Thanks a lot :D

Edited by Antonio Mecca (see edit history)
Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...