Commit 52811034 authored by git's avatar git Committed by Robert Ragas

Issue #2722491 by Vasantha Kaje: Yoast js interferes with metatag/tokens

parent 74392c26
......@@ -131,7 +131,7 @@ function yoast_seo_configuration_form(array &$form, $instance, array $options =
// Checking to see if we have to empty the default value or not.
if ($form['metatags'][$langcode]['basic']['title']['value']['#default_value'] == $metatag_config['title']['value']) {
if ($new_entity) {
$form['metatags'][$langcode]['basic']['title']['value']['#default_value'] = '';
$form['metatags'][$langcode]['basic']['title']['value']['#default_value'] = $metatag_config['title']['value'];
}
else {
$form['metatags'][$langcode]['basic']['title']['value']['#default_value'] = token_replace($metatag_config['title']['value'], array('node' => $form['#entity']));
......@@ -146,7 +146,7 @@ function yoast_seo_configuration_form(array &$form, $instance, array $options =
// Checking to see if we have to empty the default value or not.
if ($form['metatags'][$langcode]['basic']['description']['value']['#default_value'] == $metatag_config['description']['value']) {
if ($new_entity) {
$form['metatags'][$langcode]['basic']['description']['value']['#default_value'] = '';
$form['metatags'][$langcode]['basic']['description']['value']['#default_value'] = $metatag_config['description']['value'];
}
else {
$form['metatags'][$langcode]['basic']['description']['value']['#default_value'] = token_replace($metatag_config['description']['value'], array('node' => $form['#entity']));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment