Another WordPress IE issue fixed, 404 pages not working

So Im happily putting into production a nice newsletter plugin on a customer site.
Its AJAXed, got virtual page for email-response clicks and all..

To my horror the 404 pages on the customer site are displaying non graphical, text only Internet Explorer messages on the virtual page – actually any 404 pages..

I did not detect this behavior with my local IE_Tester, only the live site with the specified browser (IE 6.something) seem’d to have this issue of not letting the 404 pages resolve. (before you moan, Its impossible to upgrade browser or try another on this customer!)

I checked the PHP settings (mod_rewrite was working fine), apache server dident have anything obscure or errors popping out…

The fix. Insert this at the very top of header.php in the WordPress theme


Tip about this obtained from http://www.newnine.com/blog/47-wordpress-404-errors-in-ie

(for those worrying that this will set quirks mode – just make sure theres no spaces before the DOCTYPE)

And this really did the trick. Now WordPress allways return a page status 200 to the browser, and the build in global $wp_query; WordPress functionality will controls the error messages as expected.

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

WordPress ajax SACK dosent work for IE6

I have a big customer who uses IE6 as a platform. The last couple of days I have had my troubles working out why the described methods for doing ajax in WordPress with SACK dosent swing it..

Yes I can make it do Ajax, but having custom returnmessages (a requirement for user interaction) seems to fail on “eval(this.response)”

Yawnn..

While doing a signup for weekly digests, I have now combined various techniques to make
– a fake WordPress page – only vievable when a visitor clicks a mail response link.

– ajax the button for “confirm” or “unsubscribe” and if the clicked link dident return a known record – display form for submitting an email and “signup”
The Ajax were needed to update the database with the new status of the click, and to return a message like “thanks – blablabla..”

This is actually the second time I waste hours trying to understand why SACK dont work, If you stumble upon this, and are trying to figure out how to do AJAX and WordPress, read this brilliant tutorial: http://wpleet.com/wordpress-ajax-jquery-practice-using-shortcode

Im using it slightly differently, but that in essence is the way to do it.

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *