Last modified: 2014-05-18 17:10:16 UTC
When putting more inputboxes on page, it becomes invalid since all of them have same id="createbox". Also styling an scripting is very limited then.
http://www.mediawiki.org/wiki/Extension:Inputbox is nice example.
Suggestion: id attribute is handy, so new parameter id within <inputbox> tag would be the best solution. When id not present, no id attribute will be rendered in XHTML output.
What about createbox-0, createbox-1, etc.?
That negates all purpose of an id, probably. It should just be made a class.
-testme - the provided link (the extension description itself) is an example of page invalid because of this issue, so it's easily checkable if it's still actual since that site runs from nearby HEAD.
Fixed in r60072.
Now seeing this in 1.20wmf12 with HTML5 enabled.
Note: the extension currently uses id="searchbox"
Eg. Any page that uses [[template:talk header]] (which defaults to "search=yes") and [[template:archives]] (with the non-default "search=yes") on the same page, will experience this problem.
([[Talk:American_football]] currently does. Permalink: https://en.wikipedia.org/w/index.php?title=Talk:American_football&oldid=594144478 )
Or indeed, the extension page itself as comment 4 notes.
Quiddity: Are you saying that the value of id is ignored? Because if so I think that's fixed in Gerrit change #124132
(In reply to Alex Monk from comment #8)
> Quiddity: Are you saying that the value of id is ignored? Because if so I
> think that's fixed in Gerrit change #124132
My comment 7 was just meant to provide a few more details and examples, and to note that the id it assigns is sometimes "searchbox", and not always (as the old comment 0 says) "createbox".
Additionally, the example at [[mw:Extension:Inputbox#Parameters]] for forcing it to use "id=bar" (3rd up from bottom) doesn't seem to be working at all. (?)
Sorry, I'm not familiar with php, and don't understand what your patchset will do!
I'm also not sure what the specific real-world repercussions are, for using an id more than once for multiple forms; I just know it's not valid HTML, and ''might'' cause problems somewhere. (Screenreaders? Just other scripts?).
(For context: I'm mainly interested in this bug, because there was a related problem with Parsoid/Flow: bug 60816 and bug 60785 have details.) HTH.
Change 124169 had a related patch set uploaded by Brian Wolff:
Avoid duplicate ids
d comment 0 says) "createbox".
> Additionally, the example at [[mw:Extension:Inputbox#Parameters]] for
> forcing it to use "id=bar" (3rd up from bottom) doesn't seem to be working
> at all. (?)
> Sorry, I'm not familiar with php, and don't understand what your patchset
> will do!
I recently fixed (Gerrit change #124132) a bug where some types of inputboxes ignore the id parameter. Its not deployed to mediawiki.org yet. In about a week it should be. The search box was also still reusing ids in some situations, comment 10 fixes that issue.
> I'm also not sure what the specific real-world repercussions are, for using
> an id more than once for multiple forms; I just know it's not valid HTML,
> and ''might'' cause problems somewhere. (Screenreaders? Just other scripts?).
Change 124169 merged by jenkins-bot:
Avoid duplicate ids
Should be fixed.