Jump to content

Layered navigation not working with friendly URLs (PS 1.5.4.1)


Recommended Posts

Running on PS 1.5.4.1 I encounter this problem:

 

Layered navigation is working just fine as long as I use non friendly URLs.

As soon as I switch to friendly URLs though, the filtering stops working like it should.

Or better said, it does execute the filter perfectly at first, but then as soon as the page is properly loaded, it rewrites the URL in the address bar with a faulty URL and then immediately tries to reload that new page (the faulty URL), always resulting in reloading the main index page.

 

To put it in real life sample:

When I employ the filter "Dames" with non friendly URLs, it loads this URL:

http://www.toearegoutdoor.nl/index.php?id_category=3&controller=category#/categorie-dames

That works perfectly.

 

When I do the same with friendly URLs, it first loads:

That URL does indeed serve the correct content.
 
BUT, immediately after that page is loaded it rewrites the URL in the address bar to:
And then it immediately tries to load that new page.
 
These last 2 links don't work right now because I went back to non friendly URLs as long as the problem isn't solved.
 
All suggestions about friendly URLs I could find I have tried:
I did recreate the .htaccess, reindexed all layered navigation indexes (all 4 links).
Also checked the access rights of .htaccess.
Made the modification in blocklayered.js about the added hash sign.
 
But to be honoust I don't think the problem is in any of that.
The fact that the URL is rewritten after loading the page and then gets executed, makes me believe that a piece of javascript is executed where it should not. I just haven't got a clue what piece of js I would need to debug.
 
Hope anyone can help.
 
Link to comment
Share on other sites

I have found out via the Smarty debugger that the variable 'current_friendly_url' stays empty.

It should be set in blocklayered.php and is then used in blocklayered.js.

It seems to me that this variable should have a value but it doesn't.

 

Does anybody know why this is happening?

Or can anybody using layered navigation check whether this variable should be empty when a filter is clicked?

Link to comment
Share on other sites

I am in REAL DEEP TROUBLE now! Please HELP!!!

 

After testing on my test server I thought I had it fixed, so I did the exact same procedure on my live server. But that still did not work properly. I then copied the folder blocklayered from my test server to the live server, re-indexed everything, played with all the URL settings in the SEO optimization, but I could not get it to run.

 

So I went back to the non friendly URLs again, but now I have the same problem there too. Even a full DB and backup restore does not have any effect. Layered navigation won't work anymore, regardsless of the settings.

Now my clients cannot navigate my shop at all.

 

I think there must be something in the javascript URL rewriting somewhere because when i use the right-mouse button and select to open the filter-URL in a new tab, it works perfectly.

 

Only when I left-click the filter, it loads the proper filter result and then immediately redirects to the main index page.

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

  • 1 month later...
×
×
  • Create New...