Closed (fixed)
Project:
Drigg
Version:
5.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Apr 2008 at 23:38 UTC
Updated:
17 Aug 2008 at 11:08 UTC
Jump to comment: Most recent file
hi,
I haven't reported this earlier cause it was lower on the priority list.
When a user clicks on "Submit" button, the Story URL box borders and url address itself will turn into a Red colour!
The scoop will submit eventually with no problems, but for few seconds between the submit click and the processing time, this box turns red.
It's not a biggie, but it really confuses (maybe even scares or annoys) the end users.
It's probably something to do with drigg.js file
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | patch243411.patch | 859 bytes | cedricfontaine |
Comments
Comment #1
mercmobily commentedHi,
This is a known issue in the Drigg javascript.
It's good to have it in the bug list, but it won't get much priority.
Patches welcome.
Comment #2
mercmobily commentedHi,
Sicjoy, I don't suppose you could look into this?
Merc,
Comment #3
sikjoy commentedaccepting assignment
Comment #4
sikjoy commentedComment #5
sikjoy commentedComment #6
bflora commentedFixed? Please explain?
Comment #7
sikjoy commentedDrigg's javascript validates the form fields when each field loses focus. The URL field is validated via an ajax call to the server. Keep in mind this takes some time. Nothing wrong here.
Drigg's javascript validates the fields once again on submit. The URL validation, being a laggard, can't complete and adds the error class to the URL field.
Well, that's my theory anyway. If I can prove it, I'll eliminate the "on submit" validation and do the final form validation server side.
Off to test...
--sicjoy
Comment #8
cedricfontaine commentedWe could have the ajax request done in synchronous when submitting. Here is a patch
Comment #9
sikjoy commentedHi cedricfontaine:
While this may work, It defeats the purpose of client side programming. Why not do server side validation when the server is doing the work already?
--sicjoy
Comment #10
cedricfontaine commentedI don't think so as it's still ajax and it verifies URL in background. It's very fast and it's an available option in jquery
Comment #11
mercmobily commentedHi,
Guys, I know zip about Ajax. So, I can't *really* review this. And in fact, I can't even tell whether either one of you has a point.
Help me.
Merc.
Comment #12
cedricfontaine commentedThe XmlHttpRequest (xhr) comes back with an error when submitting. There is no specific error but as sicjoy said, it's probably cause it gets broken by the submit process.
I test and implement a synchronous check on the URL and it's really fast and avoid submit if URL is not good. Of course we can change how it works and remove verification on form submit, but why ? It seems to be a functionality lost.
Comment #13
sikjoy commentedI'm not suggesting that we lose any functionality. Nor that we get rid of the client side validation ajax calls during form field blur. These are a nice convenience to the user and don't cause this bug.
The URL validation is done server side already. We are just requesting that it be done via an ajax call then waiting for the server to report back to the client with results.
Drupal already has server side form field validation built in. We should use that instead of the ajax call during form submit.
Comment #14
sikjoy commentedActually, looking at the code, server side validation for the URL field has been done all along via hook_validate() (see drigg.module). The javascript ajax call on form submit that is causing this bug is redundant. I'm commenting it out for now as the Drigg code freeze is imminent.
Comment #15
sikjoy commentedComment #16
mercmobily commentedHi
Just to make sure, Kevin... you'ree not commenting out the Ajax checking of the stories, right?
Because it's an _important_ feature of Drigg, which really should stay.
Basically, I prefer having the "red' bug rather than disabling the URL validation *before* the person hits submit.
I can see that www.drigg.org still performs the checks before submit happens... but, please confirm that the pre-submit check will stay. It's frustrating, but I have a very limited understanding of this issue...
Bye,
Merc.
Comment #17
sikjoy commentedI mentioned this in comment #13, but I should have used more ubiquitous language.
I will not remove any of the client side form field validation that occurs before the form is submitted. That's not what is causing this bug.
I am removing the client side form field validation that is done when the form is submitted. It causes this bug and is redundant with the hook_validate function in drigg.module.
--sicjoy
Comment #18
bflora commentedAs a publisher interested in having a site like this, I'd MUCH, MUCH, MUCH rather have a site that didn't validate URLs instead of a site that did it in a way that confused, frustrated or thwarted my users.
If someone posts a bad link. It's their problem and they can blame themselves.
If someone tries to post a good link and they're shown a red box indicating there was something wrong with it, they will assume the developer is incompetent and that the site sucks and they'll never come back again. FAIL.
So please, just switch off validation if you can't get it to work right. That would be so, so much better.
Comment #19
mercmobily commentedHi,
bflora, the bug is now fixed. It shouldn't confuse your users anymore.
Merc.
Comment #20
mercmobily commentedHi,
(thanks a million sicjoy!)
Merc.
Comment #21
mercmobily commented