New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store site search settings correctly #11022
Conversation
@@ -226,7 +226,7 @@ public function setValue($value) | |||
$value = call_user_func($config->transform, $value, $this); | |||
} | |||
|
|||
if (isset($this->type)) { | |||
if (isset($this->type) && !is_null($value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed as otherwise null
values would be casted to 0
or empty string
return null;// never actually save a value for this | ||
$field->transform = function ($value) use ($settings) { | ||
if ($value) { | ||
$settings->unsetSiteSearchKeywords = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to do that using a class property, as setting a value for the other setting would be directly overwritten afterwards.
Seems not working for me. reproduce:
|
Hope that works now as expected. Please check again |
…xsitesearchsetting
fixes #10971