Skip to content
Snippets Groups Projects
Verified Commit a243c347 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3242538 by danflanagan8, mounir_abid, cilefen, DigitalFrontiersMedia,...

Issue #3242538 by danflanagan8, mounir_abid, cilefen, DigitalFrontiersMedia, super_romeo, smustgrave: Term creation fail with php 8 when override_selector = TRUE

(cherry picked from commit 86c4193f)
parent b9942ab2
Branches
Tags
17 merge requests!12482Issue #3291780 by longwave, xjm: guzzlehttp/guzzle 6.5.8 requires guzzlehttp/psr7 ^1.9,!8357Issue #2994000 by Lendude, Pasqualle, quietone, pameeela: Notice in logs when...,!4488Issue #3376281: Random machine names no longer need to be wrapped in strtolower(),!3149Issue #3282285: Email "" does not comply with addr-spec of RFC 2822,!3000Issue #793660: Check for failure of hook_install,!2940Issue #3320240: Entity count query returns a string instead of int,!2937Issue #3315245: Order of languages overrides default language fallback,!2877Issue #3056652 by yogeshmpawar, mashermike, aalin, ranjith_kumar_k_u: Link...,!2804URL of image field formatter use absolute URL option.,!2749Issue #3309024: Focus on the wrong submit button after AJAX submit,!2692Issue #3284010 by _shY, mherchel, Abhijith S: "Create content" link within...,!2608Issue #2430379 by quietone, znerol, larowlan: Add explicit test for session...,!2575Issue #3198340 by alexpott, xjm, cilefen, Mile23, mmjvb, catch, longwave, mfb,...,!1627Issue #3082958: Add gitignore(s) to composer-ready project templates,!1014Issue #3226806: Move filter implementations from filter.module to plugin classes,!939Issue #2971209: Allow the MediaLibraryUiBuilder service to use an alternative view display,!88Issue #3163299: Ajax exposed filters not working for multiple instances of the same Views block placed on one page
......@@ -63,15 +63,19 @@ public function form(array $form, FormStateInterface $form_state) {
$options[$item->tid] = str_repeat('-', $item->depth) . $item->name;
}
}
$form['relations']['parent'] = [
'#type' => 'select',
'#title' => $this->t('Parent terms'),
'#options' => $options,
'#default_value' => $parent,
'#multiple' => TRUE,
];
}
else {
$options = ['<' . $this->t('root') . '>'];
$parent = [0];
}
$form['relations']['parent'] = [
'#type' => 'select',
'#title' => $this->t('Parent terms'),
'#options' => $options,
'#default_value' => $parent,
'#multiple' => TRUE,
];
$form['relations']['weight'] = [
'#type' => 'textfield',
......
......@@ -432,6 +432,31 @@ public function testTermInterface() {
$this->assertSession()->pageTextNotContains('Save and go to list');
}
/**
* Test UI with override_selector TRUE.
*/
public function testTermSaveOverrideSelector() {
$this->config('taxonomy.settings')->set('override_selector', TRUE)->save();
// Create a Term.
$edit = [
'name[0][value]' => $this->randomMachineName(12),
'description[0][value]' => $this->randomMachineName(100),
];
// Create the term to edit.
$this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/add');
$this->submitForm($edit, 'Save');
$terms = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties([
'name' => $edit['name[0][value]'],
]);
$term = reset($terms);
$this->assertNotNull($term, 'Term found in database.');
// The term appears on the vocab list page.
$this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview');
$this->assertSession()->pageTextContains($term->getName());
}
/**
* Save, edit and delete a term using the user interface.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment