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

Consistently sort filter formats to simplify config exports

$
0
0

As mentioned at #2852557: Config export key order is not predictable, use config schema to order keys for maps, config export ordering isn't predictable. \Drupal\filter\Entity\FilterFormat attempts to order filters at \Drupal\filter\Entity\FilterFormat::filters() and \Drupal\filter\Entity\FilterFormat::preSave(), but those methods only update the order of filters inside of the FilterPluginCollection, and not the $filters property on FilterFormat. This can lead to config that is not imported cleanly, and it's especially noticable when moving config across sites or with config_split.

Since processing of filtered text relies on the in-array order of the filters and doesn't sort by weight first, let's ensure filters are consistently sorted when saving the config entity.


Viewing all articles
Browse latest Browse all 294909

Trending Articles



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