Problem/Motivation

In some cases, like for a views exposed form, the ui_suite_dsfr_theme_suggestions_form_element_alter allow invalid '-' char.

Steps to reproduce

  • Enable Views with exposed form block
  • Set the block in the page
  • Enable theme dev mode for twig suggestion
  • See in source error like
     INVALID FILE NAME SUGGESTIONS:</li>
      <li>   See https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_theme_suggestions_alter</li>
      <li>   form_element__edit-search--2</li>
      <li>

Proposed resolution

Replace these characters, and add a check for string to be defensive.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Status: Needs work » Needs review
just_like_good_vibes’s picture

thanks for the issue and MR, i will look at it asap.
i wonder if you make a separate issue to tackle the phpstan issues reported in the pipeline?

mogtofu33’s picture

The phpstan issue is not related to this change, it's a deprecation that should have its own issue for sure.

mogtofu33’s picture

Assigned: Unassigned » just_like_good_vibes
just_like_good_vibes’s picture

Assigned: just_like_good_vibes » Unassigned
Status: Needs review » Reviewed & tested by the community

just_like_good_vibes’s picture

Status: Reviewed & tested by the community » Fixed

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.

Status: Fixed » Closed (fixed)

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