Priority: Urgent
Current State: Closed
Released In: 1.1.4
Target Release: patch
Applies To: Engine
Component:
Branches:
We have a very serious problem in 1.1.3
It is impossible to edit a date of a topic with a form that has date fields.
The minute you click on the date icon the topic is saved with whatever is there.
This is creating a bit of a panic here.
To reproduce do this.
- Create a form with a field of type date
- Create a topic and add the form
- Save this topic.
- Edit the topic
- Click on the calendar icon next to the date field
- Watch the topic being saved as if you had clicked the save button
This only happens in Internet Explorer 8. I do not see it in Firefox.
This affects nearly ALL my users. I would be very thankful for a quick fix or workaround for this one.
--
KennethLavrsen - 05 May 2011
It is because of a bug in one of jquery's selectors:
$('.foswikiEditForm').submit(function(e) {
foswiki.Edit.validateMandatoryFields();
});
foswikiEditForm
is not the form, but a div. Apparently, IE8 thinks that clicking a div means submitting the form.
This is fixed with the proper reference:
$(document.forms[name='main']).submit(function(e) {
foswiki.Edit.validateMandatoryFields();
});
Oh yeah, this also means that up to now, the function
validateMandatoryFields
was never called, on no browser.
That should have been noticed before...
--
ArthurClemens - 05 May 2011
Huge thank you for fixing this so fast.
--
KennethLavrsen - 05 May 2011
For those that need a fast fix for 1.1.3 I have attached the fixed js file in the compressed form to this bug report.
Replace the /pub/System/JavascriptFiles/foswiki_edit_src.js, /pub/System/JavascriptFiles/foswiki_edit.js, and /pub/System/JavascriptFiles/foswiki_edit.js.gz by these files.
Also uploaded a zip with the 3 files. It may be easier to download without getting newline conversion problems.
--
KennethLavrsen - 05 May 2011