Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294956

Use of \Drupal\Core\Database\Install\Tasks::getFormOptions() in \Drupal\migrate_drupal_ui\Form\CredentialForm::buildForm() results in confusing description for prefix form element

$
0
0

Problem/Motivation

The migration UI re-uses the installation database form to gather db credentials from the user. This works great apart from the fact that we do:

    $db_prefix = ($profile == 'standard') ? 'drupal_' : $profile . '_';
    $form['advanced_options']['prefix'] = [
      '#type' => 'textfield',
      '#title' => t('Table name prefix'),
      '#default_value' => empty($database['prefix']) ? '' : $database['prefix'],
      '#size' => 45,
      '#description' => t('If more than one application will be sharing this database, a unique table name prefix – such as %prefix – will prevent collisions.', ['%prefix' => $db_prefix]),
      '#weight' => 10,
    ];

The description makes no sense in the migrate case (it does during installation).

This was found in #3086374: Make Drupal 8 & 9 compatible with PHP 7.4 due to the global $install_state not being set and new errors being emitted from PHP. Running Drupal\Tests\migrate_drupal_ui\Functional\d6\MultilingualReviewPageTest showed the error.

Proposed resolution

We should change the description for this form field in \Drupal\migrate_drupal_ui\Form\CredentialForm::buildForm() and perhaps rework the logic in \Drupal\Core\Database\Install\Tasks::getFormOptions so we don't set a nonsense one for migrate in the first place.

Remaining tasks

User interface changes

New UI text on migrate credentials form.

API changes

None

Data model changes

None

Release notes snippet


Viewing all articles
Browse latest Browse all 294956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>