Unverified Commit 2d72be6a authored by Oleksandr Horbatiuk's avatar Oleksandr Horbatiuk 🧩 Committed by Mark Halliwell
Browse files

Issue #3084544 by chmez: Theme updater does not work

parent 5fc643a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class Schemas extends SettingBase {
   *   The current state of the form.
   */
  public static function updateTheme(array $form, FormStateInterface $form_state) {
    if ($theme = SystemThemeSettings::getTheme($form, $form_state)) {
    if ($theme = SystemThemeSettings::getTheme(Element::create($form), $form_state)) {
      // Due to the fact that the batch API stores it's arguments in DB storage,
      // theme based objects cannot be passed as an operation argument here.
      // During _batch_page(), the DB item will attempt to restore the arguments
+3 −2
Original line number Diff line number Diff line
@@ -76,9 +76,10 @@ class UpdateManager extends PluginManager {
   */
  public function getPendingUpdates($private = FALSE) {
    $pending = [];
    $installed = $this->theme->getSetting('schemas', []);
    $installed_schemas = $this->theme->getSetting('schemas', []);
    foreach ($this->getUpdates($private) as $version => $update) {
      if ($version > $installed) {
      $installed_schema = $installed_schemas[$update->getProvider()] ?? \Drupal::CORE_MINIMUM_SCHEMA_VERSION;
      if ($version > $installed_schema) {
        $pending[$version] = $update;
      }
    }