xlin1003 β created an issue.
Add similar issue in apachesolr.
xlin1003 β created an issue.
@Joseph Patch#27 still looks good with 7.x-1.10.
xlin1003 β created an issue.
Thanks for the patch! Re-roll against latest 7.x.
I'm thinking we should also backport https://www.drupal.org/project/schema_metatag/issues/3224210 π Pivot creates empty json when using one value in a multi value field Fixed to 7.x, should we combine it in this issue?
Link related issues.
I believe the issue stems from the use of array_filter
on $options['defaults'][$metatag]['value']
within the metatag_metatags_form()
function. This results in a mismatch between the default
and value
when the instance (e.g., global) is overridden, impacting the functionality in metatag_filter_values_from_defaults()
.
function metatag_metatags_form(array &$form, $instance, array $metatags = array(), array $options = array()) {
// ... (other code)
// Add a default value form element.
if (isset($options['defaults'][$metatag]['value'])) {
if (is_array($options['defaults'][$metatag]['value'])) {
$options['defaults'][$metatag]['value'] = array_filter($options['defaults'][$metatag]['value']);
}
$metatag_form['default'] = array(
'#type' => 'hidden',
'#value' => $options['defaults'][$metatag]['value'],
);
}
When metatag_filter_values_from_defaults()
is called, the default
is set, but it does not match the value
.
function metatag_filter_values_from_defaults(array &$values, array $defaults = array()) {
foreach ($values as $metatag => $data) {
$default = isset($data['default']) ? $data['default'] : (isset($defaults[$metatag]['value']) ? $defaults[$metatag]['value'] : NULL);
if (isset($default) && isset($data['value']) && $default === $data['value']) {
// Meta tag has a default, and it matches the user-submitted value.
unset($values[$metatag]);
}
}
}
Looks good to me.
Update status
Patch to remove following YouTube URL schemes:
http://*.youtube.com/v/*
https://*.youtube.com/v/*
http://*.youtube.com/user/*
https://*.youtube.com/user/*
http://*.youtube.com/*#*/*
https://*.youtube.com/*#*/*
http://m.youtube.com/index*
https://m.youtube.com/index*
http://*.youtube.com/profile*
https://*.youtube.com/profile*
http://*.youtube.com/view_play_list*
https://*.youtube.com/view_play_list*
xlin1003 β created an issue.
Fix comments.
Explicitly return empty string on form_type_icon_selector_value()
to avoid it using inputs as #value
, @see _form_builder_handle_input_element.
Patch to unset #value
xlin1003 β created an issue.