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

  1. Download the module simple_sitemap with composer: composer require drupal/simple_sitemap
  2. Enable the extension simple_sitemap: drush enable simple_sitemap
  3. Configure a site map
  4. Enable content and configure the bundles
  5. Choose the option "Do not index entities of type Article in sitemap Default"
  6. Save the configuration
  7. The result is : radio buttons colored in red
  8. Log message: The submitted value in the bundles element is not allowed.
  9. Choose the option "Index entities of type Article in sitemap Default"
  10. select "No" in the combo "Include image"
  11. Save the configuration
  12. The result is : combo colored in red with message "The value is not allowed"
  13. Log message: The submitted value in the Include images element is not allowed.

Who can manage this issue, please ?

CommentFileSizeAuthor
#2 sitemaps_2.png78.62 KBfabrondeau
#2 sitemaps_1.png32.16 KBfabrondeau

Comments

fabrondeau created an issue. See original summary.

fabrondeau’s picture

StatusFileSize
new32.16 KB
new78.62 KB
gbyte’s picture

Component: User interface » Code
Category: Bug report » Support request
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Well 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.

fabrondeau’s picture

Hello 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.

fabrondeau’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

gbyte’s picture

Status: Closed (won't fix) » Fixed

Marking as fixed as this is now a support request.

fabrondeau’s picture

To 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:

  • widgets for fields collections weights are KO
  • The include_image in the simple_sitemap config is KO

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.

komejo’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.