You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

history plugin: fix for hash-less initial urls Created Jun 3, 2010

This thread is solved

Views: 2809     Replies: 7     Last reply Sep 19, 2010  
You must login first before you can use this feature

heldchen

Posts: 5

Registered:
May 7, 2010

history plugin: fix for hash-less initial urls

Posted: Jun 3, 2010

when using history in tabs and the first pageload does not contain a hash-tag, the 1.2.2 history version adds an empty hash to the url, which some of our users reported causing (non-reproducable) page loading problems in IE6/7.

this can be prevented by changing line 94 in history.js:

if (hash != '' && hash != '#') 
   window.location.hash = hash;

(check for emtpy hash: needed for ie < 8)

ehmatx

Posts: 9

Registered:
Sep 30, 2009

This is crazy

Posted: Jun 19, 2010

Reply to: history plugin: fix for hash-less initial urls, from heldchen
I'm having nothing but problems with this. I can't believe i have to download the history plugin separately and then make and edit to the core files. are you guys serious?

heldchen

Posts: 5

Registered:
May 7, 2010

» This is crazy

Posted: Jun 19, 2010

Reply to: This is crazy, from ehmatx
FWIW, i posted some history fixes to the github bugreporting, which seem to solve all issues i experienced with the plugin. the "fix" above is a bit outdated. not sure any dev cares tho, the problems reported for 1.2.2 are still in the latest 1.2.3 version...

ehmatx

Posts: 9

Registered:
Sep 30, 2009

» » This is crazy

Posted: Jun 19, 2010

Reply to: » This is crazy, from heldchen
yea, that's absurd. It's like these guys got the concept right for how to do this stuff, but they have just totally screwed up on so many of the details. this library is a complete pain to work with, and then when you start digging into it and you see stuff like this, it just makes you want to jump out a window.

not only that, it's nearly all trial and error to figure out why things don't work. their demo's and explinations are piss poor at really helping you understand what's going on and they consistantly leave out critical information.

i think i need to find a new effects library for this stuff. these guys clearly don't care if they do it right or not.

heikki

Posts: 291

Registered:
Sep 5, 2010

» » This is crazy

Posted: Sep 12, 2010

Reply to: » This is crazy, from heldchen
Link to the bug report:

http://github.com/jquerytools/jquerytools/issues/#issue/77

Code for the history plugin:

http://github.com/jquerytools/jquerytools/blob/master/src/toolbox/toolbox.history.js

Henrik Bechmann
bechmann.ca

Posts: 20

Registered:
Sep 3, 2010

» history plugin: fix for hash-less initial urls

Posted: Sep 10, 2010

Reply to: history plugin: fix for hash-less initial urls, from heldchen
Easy to reproduce:

With history on, ie and ff show hash mark at end of url (as the result of internally generated "click") when first going to page. Then to create error in IE (including version 8), hit *refresh* (now with the trailing hash mark on the url).

ff succeeds, but ie generates error (from within jquery itself, complaining about uncaught error within jquery library line 2904:

Sizzle.error = function( msg ) {
	 throw "Syntax error, unrecognized expression: " + msg;
};
where msg="#") and shuts down javascript.

(Chrome doesn't generate hash mark, nor the problem).

I've had to turn history off until I find a workaround.

- Henrik

Henrik Bechmann
bechmann.ca

Posts: 20

Registered:
Sep 3, 2010

» » history plugin: fix for hash-less initial urls

Posted: Sep 10, 2010

Reply to: » history plugin: fix for hash-less initial urls, from HBechmann
I've downloaded a version of query tools library *without* history, then downloaded history separately, linked it separately, and made the change in the history code that heldchen suggested.

That fixed the problem, but of course now I'm running a fork, not good.

I have to agree with the other writers that this is not very impressive QA. Possible to organize a QA group?

There's a design perspective on this as well: what sense does it make to have an empty hash after a url in the first place? It generates an extra unnecessary back button action required of the user. One click to get in, two to get out. This is the sort of nuisance that can confound and frustrate users, undermining confidence.

- Henrik

Henrik Bechmann
bechmann.ca

Posts: 20

Registered:
Sep 3, 2010

» history plugin: fix for hash-less initial urls

Posted: Sep 19, 2010

Reply to: history plugin: fix for hash-less initial urls, from heldchen
To reproduce the problem, do the following:

1. Go to http://flowplayer.org/tools/demos/tabs/ajax-history.html with IE (I'm using IE 8)
2. Note that the history plugin adds a trailing hash (#) to the url
3. Hit refresh on the browser
4. Note that javascript has crashed (note error indicator in IE status bar, and that no content appears in tab pane).

Needless to say this is a critical bug.

Hope this helps.

- Henrik