Issue #2385047: Remove disabled filters from text format configuration
1 unresolved thread
Merge request reports
Activity
added 34 commits
-
2a5cc130...467d4fd1 - 33 commits from branch
project:9.3.x
- 548d123c - Issue #2385047 by webflo, KarlShea: Remove disabled filters from text format configuration
-
2a5cc130...467d4fd1 - 33 commits from branch
added 4516 commits
- 72fc1f2b...dd1cdf78 - 4506 earlier commits
- 17ec849e - Issue #3449743 by catch: Try to optimize test ordering when run-tests.sh is...
- d4883273 - Issue #3444699 by Gauravvvv, finnsky, ahsannazir, nod_, SKAUGHT, Kanchan...
- 7366b68d - Issue #3446413 by shaal, Gábor Hojtsy, smustgrave, quietone: Update the Drupal...
- 8778ac18 - Issue #3437166 by Utkarsh_33, smustgrave, Jaypan, wdmartin: Update...
- d7f114cd - Issue #3447881 by plopesc, catch, larowlan, smustgrave, quietone: Improve...
- 8b19e428 - Issue #3085360 by bradjones1, josephdpurcell, Giuseppe87, ravi.shankar,...
- 6fc1e6f2 - Issue #3438878 by skyriter, ahsannazir, rkoller, ckrina, mradcliffe,...
- 28dac554 - Issue #2640994 by dww, tduong, Alex Bukach, Berdir, ameymudras, catch,...
- 645c4957 - Issue #3441222 by kristiaanvandeneynde, nicxvan, catch, alexpott, smustgrave,...
- a981af01 - Issue #2385047 by webflo, KarlShea: Remove disabled filters from text format configuration
Toggle commit list110 110 // Remove configuration if it matches the defaults. In self::getAll(), we 111 111 // load all available filters, in addition to the enabled filters stored in 112 112 // configuration. In order to prevent those from bleeding through to the 113 // stored configuration, remove all filters that match the default values. 113 // stored configuration, remove all disabled filters or filters that match 114 // the default values. 114 115 // Because filters are disabled by default, this will never remove the 115 116 // configuration of an enabled filter. 116 117 foreach ($configuration as $instance_id => $instance_config) { 117 118 $default_config = []; 118 119 $default_config['id'] = $instance_id; 119 120 $default_config += $this->get($instance_id)->defaultConfiguration(); 120 if ($default_config === $instance_config) { 121 if (empty($instance_config['status']) || $default_config === $instance_config) { Handling the removal of disabled filters on the collection level since there's a chance that some modules with dynamic
defaultConfiguration()
definitions such asgutenberg
(or any module with an incorrectly defineddefaultConfiguration()
) can potentially have an instance configuration which doesn't match thedefaultConfiguration()
.This is because the default
\Drupal\filter\Plugin\FilterBase::getConfiguration()
call doesn't make a call todefaultConfiguration()
in order to merge it. And will subsequently add the disabled module as a dependency even if it's no longer added to the exported config.
added 1330 commits
-
b0ec1263...30402dc3 - 1329 commits from branch
project:11.x
- 85ae8165 - Issue #2385047 by webflo, KarlShea: Remove disabled filters from text format configuration
-
b0ec1263...30402dc3 - 1329 commits from branch
Please register or sign in to reply