Page MenuHomePhabricator

"Regular expression filter" not working anymore in MW-1.24.2
Closed, ResolvedPublic

Description

It seems that the Regular expression filter is broken in MW-1.24.2. Expression used in the form checks if input is a number and 8 digits long:

{{{field|value|input type=regexp|regexp=/^\d*$/|message=Only numbers!|base type=regexp|base prefix=filter2|filter2.regexp=/^.{8,8}$/|filter2.message=value must have 8 digits!}}}

Result:

Found out after updating from MW-1.22.5 to MW-1.24.2. After this I tested the same code in clean wikis with only SemanticForms and SemanticFormsInputs enabled:

  • MW-1.22.5 works fine.
  • MW-1.23.9 works fine.
  • MW-1.24.2 stops working.

Setup for all wikis (on Windows 7):

Event Timeline

Jongfeli raised the priority of this task from to Needs Triage.
Jongfeli updated the task description. (Show Details)
Jongfeli added a subscriber: Jongfeli.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 23 2015, 12:44 PM

Any Javascript errors on the browser console?

Jongfeli added a comment.EditedApr 23 2015, 1:29 PM

No, no Javascript errors. I do see a difference in the HTML code, maybe that can be of help.

In MW-1.22.5 and MW-1.23.9:

<span class="inputSpan">
        <input id="input_2" class="createboxInput" name="Test[value]" size="35" tabindex="2">
</span>

In MW-1.24.2 it is called:

<span class="inputSpan">
        <input id="input_2" class="createboxInput mw-ui-input" name="Test[value]" size="35" tabindex="2">
</span>
Jongfeli set Security to None.Nov 12 2015, 8:51 AM
Jongfeli added subscribers: Yaron_Koren, JeroenDeDauw.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptNov 12 2015, 8:51 AM
Foxtrott closed this task as Resolved.Feb 8 2016, 9:57 PM
Foxtrott claimed this task.

Regexp was transferred from SemanticFormsInputs to SemanticForms and fixed.
Youĺl have to update to SFI 0.10.0 and SF 3.4.3

See 36382af25e40980c7420047733a8c16e7e07e365