Page MenuHomePhabricator

MediaWiki installer has extra newlines on radio buttons
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to web installer
  • go to the DBConnect page (second page) where you select your database type

What happens?:
Extra newline between radio button and their label which looks really odd. See screenshot.

What should have happened instead?:

It should not have a newline

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Current master (3ebe31bb069054af6f1130531d865b4c806e0b2f)

Other information (browser name/version, screenshots, etc.):

mwinstaller.png (771×557 px, 68 KB)

Firefox 115.14.0esr

Event Timeline

Change #1105996 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] Installer: Fix db type radio button

https://gerrit.wikimedia.org/r/1105996

Change #1105996 merged by jenkins-bot:

[mediawiki/core@master] Installer: Fix db type radio button

https://gerrit.wikimedia.org/r/1105996

It does look like there are other buttons with a similar issue.

It does look like there are other buttons with a similar issue.

Didn't I fix all of them? Which ones exactly have an issue?

Change #1264679 had a related patch set uploaded (by Reedy; author: Amir Sarabadani):

[mediawiki/core@REL1_43] Installer: Fix db type radio button

https://gerrit.wikimedia.org/r/1264679

I love the dejavu realising we never backported things.

But at least testing against REL1_43 (without the patch applied), the next step has issues...

Screenshot 2026-03-30 at 17.42.04.png (871×1,189 px, 117 KB)

It does look like there are other buttons with a similar issue.

Didn't I fix all of them? Which ones exactly have an issue?

Yeah, fixes the DB ones as originally reported, but the next steps (at least on REL1_43) have the same issues as shown in the screenshot above.

Reedy renamed this task from MediaWiki installer has extra newlines on radio buttons when selecting installer type to MediaWiki installer has extra newlines on radio buttons.Mar 30 2026, 4:47 PM

Screenshot 2026-03-30 at 17.48.36.png (839×1,163 px, 172 KB)

Change #1264679 merged by jenkins-bot:

[mediawiki/core@REL1_43] Installer: Fix db type radio button

https://gerrit.wikimedia.org/r/1264679

WebInstaller.php-			$itemAttribs['tabindex'] = $this->nextTabIndex();
WebInstaller.php:			Html::addClass( $itemAttribs['class'], 'cdx-radio__input' );
WebInstaller.php-
--
WebInstaller.php-			$items[$value] =
WebInstaller.php:				'<span class="cdx-radio">' .
WebInstaller.php:				'<span class="cdx-radio__wrapper">' .
WebInstaller.php-				Html::radio( $params['controlName'], $checked, $itemAttribs + [ 'value' => $value ] ) .
WebInstaller.php:				'<span class="cdx-radio__icon"></span>' .
WebInstaller.php:				'<span class="cdx-radio__label cdx-label">' .
WebInstaller.php-				Html::rawElement(
--
WebInstallerDBConnect.php-			$installer = $this->parent->getDBInstaller( $type );
WebInstallerDBConnect.php:			$types .= "<div class=\"cdx-radio\"><div class=\"cdx-radio__wrapper\">";
WebInstallerDBConnect.php-			$id = "DBType_$type";
--
WebInstallerDBConnect.php-						'id' => $id,
WebInstallerDBConnect.php:						'class' => [ 'cdx-radio__input', 'dbRadio' ],
WebInstallerDBConnect.php-						'rel' => "DB_wrapper_$type",
--
WebInstallerDBConnect.php-				) .
WebInstallerDBConnect.php:				"\u{00A0}<span class=\"cdx-radio__icon\"></span>" .
WebInstallerDBConnect.php:				Html::label( $installer->getReadableName(), $id, [ 'class' => 'cdx-radio__label' ] );
WebInstallerDBConnect.php-			$types .= "</div></div>";

The DB example fixed above:

<div class="config-block-elements">
<ul class="config-settings-block">
</ul><div class="cdx-radio"><div class="cdx-radio__wrapper"><input name="DBType" type="radio" value="mysql" checked="checked" id="DBType_mysql" class="cdx-radio__input dbRadio" rel="DB_wrapper_mysql">&nbsp;<span class="cdx-radio__icon"></span><label for="DBType_mysql" class="cdx-radio__label">MariaDB, MySQL, or compatible</label></div></div><div class="cdx-radio"><div class="cdx-radio__wrapper"><input name="DBType" type="radio" value="postgres" id="DBType_postgres" class="cdx-radio__input dbRadio" rel="DB_wrapper_postgres">&nbsp;<span class="cdx-radio__icon"></span><label for="DBType_postgres" class="cdx-radio__label">PostgreSQL</label></div></div><div class="cdx-radio"><div class="cdx-radio__wrapper"><input name="DBType" type="radio" value="sqlite" id="DBType_sqlite" class="cdx-radio__input dbRadio" rel="DB_wrapper_sqlite">&nbsp;<span class="cdx-radio__icon"></span><label for="DBType_sqlite" class="cdx-radio__label">SQLite</label></div></div><br style="clear: left">
  </div>

Made pretty:

<div class="config-block-elements">
  <ul class="config-settings-block"></ul>
  <div class="cdx-radio">
    <div class="cdx-radio__wrapper">
      <input name="DBType" type="radio" value="mysql" checked="checked" id="DBType_mysql" class="cdx-radio__input dbRadio" rel="DB_wrapper_mysql">&nbsp; <span class="cdx-radio__icon"></span>
      <label for="DBType_mysql" class="cdx-radio__label">MariaDB, MySQL, or compatible</label>
    </div>
  </div>
  <div class="cdx-radio">
    <div class="cdx-radio__wrapper">
      <input name="DBType" type="radio" value="postgres" id="DBType_postgres" class="cdx-radio__input dbRadio" rel="DB_wrapper_postgres">&nbsp; <span class="cdx-radio__icon"></span>
      <label for="DBType_postgres" class="cdx-radio__label">PostgreSQL</label>
    </div>
  </div>
  <div class="cdx-radio">
    <div class="cdx-radio__wrapper">
      <input name="DBType" type="radio" value="sqlite" id="DBType_sqlite" class="cdx-radio__input dbRadio" rel="DB_wrapper_sqlite">&nbsp; <span class="cdx-radio__icon"></span>
      <label for="DBType_sqlite" class="cdx-radio__label">SQLite</label>
    </div>
  </div>
  <br style="clear: left">
</div>

Currently broken example:

<div class="config-block-elements">
<span class="cdx-radio"><input name="config__NamespaceType" type="radio" value="site-name" checked="checked" class="enableForOther cdx-radio__input" rel="config_wgMetaNamespace" id="config__NamespaceType_site-name" tabindex="2"><span class="cdx-radio__icon"></span>&nbsp;<label for="config__NamespaceType_site-name" class="cdx-radio__label">Same as the wiki name: </label></span>
<span class="cdx-radio"><input name="config__NamespaceType" type="radio" value="generic" class="enableForOther cdx-radio__input" rel="config_wgMetaNamespace" id="config__NamespaceType_generic" tabindex="3"><span class="cdx-radio__icon"></span>&nbsp;<label for="config__NamespaceType_generic" class="cdx-radio__label">Project</label></span>
<span class="cdx-radio"><input name="config__NamespaceType" type="radio" value="other" class="enableForOther cdx-radio__input" rel="config_wgMetaNamespace" id="config__NamespaceType_other" tabindex="4"><span class="cdx-radio__icon"></span>&nbsp;<label for="config__NamespaceType_other" class="cdx-radio__label">Other (specify)</label></span>
  </div>

Pretty:

<div class="config-block-elements">
  <span class="cdx-radio">
    <input name="config__NamespaceType" type="radio" value="site-name" checked="checked" class="enableForOther cdx-radio__input" rel="config_wgMetaNamespace" id="config__NamespaceType_site-name" tabindex="2">
    <span class="cdx-radio__icon"></span>&nbsp; <label for="config__NamespaceType_site-name" class="cdx-radio__label">Same as the wiki name: </label>
  </span>
  <span class="cdx-radio">
    <input name="config__NamespaceType" type="radio" value="generic" class="enableForOther cdx-radio__input" rel="config_wgMetaNamespace" id="config__NamespaceType_generic" tabindex="3">
    <span class="cdx-radio__icon"></span>&nbsp; <label for="config__NamespaceType_generic" class="cdx-radio__label">Project</label>
  </span>
  <span class="cdx-radio">
    <input name="config__NamespaceType" type="radio" value="other" class="enableForOther cdx-radio__input" rel="config_wgMetaNamespace" id="config__NamespaceType_other" tabindex="4">
    <span class="cdx-radio__icon"></span>&nbsp; <label for="config__NamespaceType_other" class="cdx-radio__label">Other (specify)</label>
  </span>
</div>