Problem/Motivation
Users are blocked when editing contents, because of the simple_sitemap configuration.
Sitemap configuration by bundle doesn't work when "Include image" value is "No" (0). It only works when the value is Yes (1).
The result is the same for the radio buttons to choose Index or not: "Do not index entities of type Article in sitemap Default" value is 0, "Index entities of type Article in sitemap Default" is 1.
1 is working well. 0 is not working.
When editing a content, only the option "Index entities of type Article in sitemap Default" works, and we must choose the option "Include image" with "Yes" value.
I'm looking for the root cause but I can't find it.
Steps to reproduce
- Download the module simple_sitemap with composer:
composer require drupal/simple_sitemap
- Enable the extension simple_sitemap:
drush enable simple_sitemap
- Configure a site map
- Enable content and configure the bundles
- Choose the option "Do not index entities of type Article in sitemap Default"
- Save the configuration
- The result is : radio buttons colored in red
- Log message: The submitted value in the bundles element is not allowed.
- Choose the option "Index entities of type Article in sitemap Default"
- select "No" in the combo "Include image"
- Save the configuration
- The result is : combo colored in red with message "The value is not allowed"
- Log message: The submitted value in the Include images element is not allowed.
Who can manage this issue, please ?
Comments
Comment #2
fabrondeau commentedComment #3
gbyteWell that would be a pretty bad bug, however can't reproduce on Drupal 11.3.10 with the dev version of this module (which all bug reports should be created against BTW).
Not sure what changes the values on your install, but please try to reproduce this on a clean Drupal install first.
Comment #4
fabrondeau commentedHello gbyte, thank you for having tryed to reproduce the bug.
After atest on a new environment, ou of my project, I can't reproduce it neither.
So, Ithink it is a local root cause I'm trying to find out.
I can close the ticket, until I find the root cause.
Comment #5
fabrondeau commentedComment #7
gbyteMarking as fixed as this is now a support request.
Comment #8
fabrondeau commentedTo conclude with a solution in this context:
After a large search delay, I've found the core Html:escape patch :
https://www.drupal.org/files/issues/2025-06-27/fix-type-error-null-text.patch.
As it returns '' when $text is 0, and it is used to fill the form_state value, when a select or a radio widget is used, with the path, th e Html::escape(0) returns ''.
That was usefull a given time but today it's blocking the website in many cases:
And I guess many forms would be out of work with this path.
I've deleted it from composer, and reinstalled the core.
Everything is OK now.
Comment #9
komejo commentedIssue here: https://www.drupal.org/project/drupal/issues/3523317