Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Wordpress URL variables

works in FF but not in IE or Chrome

         

andrewshim

4:16 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi... I haven't been here for years, but I have a problem that I can't solve. I'm using a plugin that embeds a search box in the sidebar of my blog. When I enter a phrase and search, the URL that appears is like this :

http://www.domain.com/qsearch/?productline=055758123540&department=Art_and_Posters_Perfect_Posters&keywords=animals

Where "qsearch" is a Wordpress page that displays content based on the URL variables.

This URL works perfectly in Firefox (page displays all content) but is broken in IE and Chrome (error broken link).

Anyone have any ideas?

[edited by: lorax at 4:31 pm (utc) on Oct 25, 2014]

lorax

4:32 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are pretty permalinks setup?

andrewshim

4:34 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Permalinks are set to custom structure /%postname%/.

lorax

4:45 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's very odd. I assume the store (it looks like you have one) uses the proper permalink structure? I'd expect the plugin to return the pretty permalinks instead of the vars. Have you checked the plugin's forums for this issue?

andrewshim

4:51 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Apologies lorax... the plugin itself returns a simplified URL :

http://www.domain.com/qsearch/?keywords=animals

which triggers the same problem.

The long URL is produced by a modified variation of the search box by this plugin. Am also checking the plugin website but no luck thus far.

[edited by: lorax at 4:58 pm (utc) on Oct 25, 2014]
[edit reason] delinked [/edit]

lorax

5:00 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So you can see the search results page in IE - but you get a 404 when you click on one of the links.

<added> what does the source code look like for one of these links </added>

andrewshim

5:20 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No... the URL

http://www.domain.com/qsearch/?keywords=animals

Loads perfectly in Firefox. I can see the whole page with my products.

But when I paste the same URL in IE or Chrome, I get

"Oops! This link appears to be broken." appearing in my IE and Chrome browser.

[edited by: lorax at 5:27 pm (utc) on Oct 25, 2014]
[edit reason] delinked [/edit]

lorax

5:35 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Which plugin are you using? Advance WP Query Search Filter?

lorax

5:38 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Also - does the URL resolve to something else in FF?

lucy24

6:10 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The obligatory "Is the appliance plugged in?" question: Same behavior after you empty all browser caches?

It would be better if it didn't work in FF, because then you could use the LiveHeaders addon to see exactly what's happening. Otherwise you have to fall back on your raw logs, which is a little more time-consuming. Is this happening on the live site or on a local pseudo-server (WAMP etc)?

Do the error messages come from the browser or from your own site (custom 404 page or similar)? "This link is broken" isn't normally a browser error, because how would the browser know? Unless it's an infinite-redirect issue, which would show up in logs too.

not2easy

6:31 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



No... the URL <snip> Loads perfectly in Firefox. I can see the whole page with my products.

But when I paste the same URL in IE or Chrome, I get

"Oops! This link appears to be broken." appearing in my IE and Chrome browser.

If I understood this right, you are not using IE or Chrome to perform the search, but pasting the results URL in the address bar of a browser that did not perform the search? If that is the case, it is common to get a 404 error if you are pasting the query results in the browser's address bar because the dynamic search results aren't generated. It is like trying to link to a search results page from a search engine. The results are generated by the query. Do you get the same error if you perform the search using IE or Chrome and let the plugin generate the results?

lucy24

7:44 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It is like trying to link to a search results page from a search engine.

Well, not necessarily. The URL-- the one in your address bar, not the individual one you click on-- includes all possible search information. You can do a google search in one browser and then paste its results into a different browser.

Different tack: Does your site's internal code say something about requests for URLs in /qsearch/ when the referer is something other than the Search page? This may be hard to work out if the code is CMS-internal rather than htaccess-external. But the CMS docs should say somewhere.

lorax

8:18 pm on Oct 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Good thoughts not2easy and lucy24.

I'd also like to know what the results are of an HTML validator run against that URL.

andrewshim

12:35 am on Oct 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh wow... thanks for the replies guys... sorry for the delay in replying, I'm halfway round the world in a different time zone.

Am going to go through your posts first slowly so I understand and check on my end. Will posts findings.

andrewshim

4:21 am on Oct 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Which plugin are you using? Advance WP Query Search Filter?


Zstore Helper v1.5.
Its a plugin that pulls out products from a POD marketplace and displays them in a blog/website.

Also - does the URL resolve to something else in FF?


Not sure what you mean, but its just a simple widget that you place in the sidebar. It then displays a simple Search Box in the sidebar. When I enter a search phrase (example "funny") it then displays the results in a page (the page's content is just a single line of code with the POD's parameters eg : [zstore keywords = "funny" productlineID = "1234"]). After hitting the Search button, the browser then displays the page properly in FF (with the URL "http://www.domain.com/qsearch/?keywords=funny"). I do not key in the URL in anyway (althoug I could and the behaviour would still be the same - ok in FF, 404 in Chrome and "Oops" in IE). It appears in the address bar by itself.

The obligatory "Is the appliance plugged in?" question: Same behavior after you empty all browser caches?


Updated Chrome. Now what I get is this :

FF : All fine. Displays correctly.
Chrome : My blog's default 404 error.
IE : "Oops! This link appears to be broken."

Is this happening on the live site or on a local pseudo-server (WAMP etc)?


Live. By "pseudo-server (WAMP etc)" I'm assuming you mean like if I'm designing a web page and use the software's preview feature right?

Different tack: Does your site's internal code say something about requests for URLs in /qsearch/ when the referer is something other than the Search page? This may be hard to work out if the code is CMS-internal rather than htaccess-external. But the CMS docs should say somewhere.


Don't quite understand. I'm a self-taught programmer with limited coding skills. I'm wondering if WP allows URL parameters to be passed in such a manner in the first place. I'm used to seeing URLS like example.php?parameter=1, NOT wppage/?parameter=1.

I'd also like to know what the results are of an HTML validator run against that URL.


will check. will also peek at my logs, although I don't know what to look for.

Update: HTML validater (http://validator.w3.org) spits out a 404 error.

andrewshim

4:54 am on Oct 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OMG! It was a seriously nooob oversight on my end. The page was set to "private" in WP as I worked on the testing. Once I set it to public, all's well. Sorry for taking everyone's time. Good learning experience though. BIG sigh of relief!

lorax

12:41 pm on Oct 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ROFL - I should have thought to ask that question! I'm glad you got it sorted. Cheers!

lucy24

7:31 pm on Oct 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



"Been there. Done that."