Edgewall Software
Modify

Opened 7 years ago

Last modified 4 weeks ago

#13141 reopened defect

"Form Submission Failed" on /query on Chrome when adding filters

Reported by: Adam Johnson <me@…> Owned by: Jun Omae
Priority: normal Milestone: 1.6.1
Component: general Version: 1.6
Severity: normal Keywords: jquery chrome
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hi,

I got this error when trying to search for tickets on the Django Trac at https://code.djangoproject.com/query just now using the latest version of Chrome, 73. It also happens on Trac Trac ( https://trac.edgewall.org/query ).

After adding a filter, the form refuses to submit. Checking in the dev console I see the error message:

"Form submission failed, as the <SELECT> element named '0_description_mode' was implicitly closed by reaching the end of the file. Please add an explicit end tag ('</SELECT>')."

I checked and this does not happen in Firefox, my guess it's some new behaviour in Chrome.

I hacked around in the Chrome dev tools and found that modifying query.js to create the element with an extra '</select>' in its HTML, this stops occurring.

Attachments (3)

0001-Fix-issue-13141.patch (747 bytes ) - added by Adam Johnson <me@…> 7 years ago.
Patch
Screenshot 2019-03-31 at 10.34.50.png (428.8 KB ) - added by Adam Johnson <me@…> 7 years ago.
Screenshot of error
jquery-explicitly-closing-tags.diff (5.6 KB ) - added by Jun Omae 5 weeks ago.

Download all attachments as: .zip

Change History (15)

by Adam Johnson <me@…>, 7 years ago

Attachment: 0001-Fix-issue-13141.patch added

Patch

by Adam Johnson <me@…>, 7 years ago

Screenshot of error

comment:1 by anonymous, 7 years ago

Here it's suggested to:

Go to chrome://flags/#enable-experimental-web-platform-features and click Disable.

And links to WhatWG.

comment:2 by Adam Johnson <me@…>, 7 years ago

Thanks, that fixed it for me. Did not even cross my mind that it could be an experimental feature, which I turned on a few weeks ago.

comment:3 by Jun Omae, 7 years ago

Milestone: undecided

Reproduced but the select element has </select>.

$('select[name=0_description_mode]').parent().parent().html()
"<td><div class="inlinebuttons"><input type="button" value="–"></div></td><th scope="row"><label id="label_0_description">Description</label></th><td class="mode"><select name="0_description_mode"><option value="~">contains</option><option value="!~">doesn't contain</option></select></td><td class="filter"><input type="text" name="0_description" size="42"></td>"

I believe that is a Chrome / Chromium issue. Please report Chrome or Chromium bug tracker. The experimental feature should be disabled.

comment:4 by Jun Omae, 7 years ago

Owner: Adam Johnson <me@…> removed
Status: assignednew

comment:5 by anonymous, 7 years ago

Keywords: chrome added

comment:7 by Ryan J Ollos, 7 years ago

Milestone: undecided
Resolution: cantfix
Status: newclosed

comment:8 by Weston Ruter, 2 years ago

I just encountered this issue on the WordPress Trac instance. I opened a ticket there as well.

I was able to fix the problem locally via Local Overrides in Chrome DevTools. I modified https://s.w.org/style/trac/common/js/query.js?v=216 by simply supplying the missing </select>:

44c44
<     var e = $($.htmlFormat('<select name="$1">', name));
---
>     var e = $($.htmlFormat('<select name="$1"></select>', name));

comment:9 by Athari, 5 weeks ago

I'm encountering this problem right now in Edge. enable-experimental-web-platform-features is enabled, but I have no plans to change browser settings for one specific website's bugs.

The workaround I'm using right now: before submitting the search form, run this code in the dev console:

document.querySelectorAll('select').forEach(e => e.outerHTML = e.outerHTML)

Chrome team closed their issue <link-removed> as "won't fix", so you might want to fix it on your side. The code is provided above by Weston Ruter. Basically, just add the closing tag.

P.S. Wat:

URL's blacklisted by dbl.spamhaus.org (issues.chromium.org[255.255.254])

Anyway, the link is provided above by Adam Johnson.

comment:10 by Jun Omae, 5 weeks ago

Milestone: 1.6.1
Owner: set to Jun Omae
Version: 1.6

Hm, according to https://jquery.com/upgrade-guide/3.5/, it seems that we should explicitly close a tag with attributes when passed to jQuery. I just created a patch: attachment:jquery-explicitly-closing-tags.diff.

by Jun Omae, 5 weeks ago

comment:11 by Jun Omae, 5 weeks ago

Keywords: jquery added

comment:12 by Jun Omae, 4 weeks ago

Resolution: cantfix
Status: closedreopened

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain Jun Omae.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from Jun Omae to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.