Page 1 of 1

Custom ticket query on TRAC broken

Posted: 14 May 2018 23:41
by styxxx
Hi,

it seems like your trac installation has some issues.
I cannot show custom querys. Nothing happens at all.

Console log says:
Form submission failed, as the <SELECT> element named '0_type_mode' was implicitly closed by reaching the end of the file. Please add an explicit end tag ('</SELECT>')
End tags are indeed missing in the source for all the <select> elements. The code is therefore invalid since both the starting and ending tag are mandatory.


Using Google Chrome 66.0.3359.139

Re: Custom ticket query on TRAC broken

Posted: 15 May 2018 10:45
by thresh
Sorry, cant reproduce on both Linux/Chromium 66.0.3359.139 (no extensions whatsoever, clean install), and Windows 10 Chrome 66.0.3359.170 (also no extensions and clean install on a VM).

Re: Custom ticket query on TRAC broken

Posted: 09 Oct 2018 13:25
by styxxx
The problem still exists.

Go to https://trac.videolan.org/vlc/query and select some filter from the drop-down. Watch the console, it will show something like:
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>')
The name depends on your selection since the element is created dynamically by query.js.

The error is in the createSelect function (starting at query.js line 43) which only creates the start tag. It does the same for other tags (createCheckbox, createRadio, ..).

Code: Select all

// Create a <select> function createSelect(name, options, optional, optgroups) { var e = $($.htmlFormat('<select name="$1">', name)); <- just the opening tag here if (optional) $("<option>").appendTo(e); appendOptions(e, options); if (optgroups) { for (var i = 0; i < optgroups.length; i++) { var grp = optgroups[i]; var optgrp = $($.htmlFormat('<optgroup label="$1">', grp.label)); appendOptions(optgrp, grp.options); optgrp.appendTo(e); } } return e; }
When selecting a filter the code at line 163 is triggered ($filters.find("select[name^=add_filter_]").change(function()) which includes the buggy createSelect.

I don't know why your Chromium doesn't complain because there actually is an error in the code.