Commit 1259a0fb authored by João Ventura's avatar João Ventura Committed by Joao Ventura
Browse files

Issue #3312369 by recrit, jcnventura: Attributes do not save on the default translation

parent 024fc471
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ function menu_link_attributes_menu_link_content_form_entity_builder($entity_type
      }
    }

    $menu_link_attributes = array_filter($menu_link_attributes);
    $menu_link_options = array_filter($menu_link_attributes);
  }
  else {
    $original = \Drupal::entityTypeManager()
@@ -186,7 +186,7 @@ function menu_link_attributes_menu_link_content_form_entity_builder($entity_type
    $menu_link_options = $original->get('link')->first()->options;
  }

  $menu_link->link->first()->options = $menu_link_attributes;
  $menu_link->link->first()->options = $menu_link_options;

  // Set for other languages.
  if ($menu_link->isDefaultTranslation() || !$menu_link->isDefaultTranslationAffectedOnly()) {