Problem/Motivation
This module's core version requirement string says it works with Drupal 9, 10, and 11.
In Drupal 11, warnings and preventions both work as expected.
In Drupal 10, I see no warnings, only preventions.
In Drupal 9, the module causes an exception - Drupal\Component\Plugin\Exception\PluginNotFoundException: The "AltTextRules" plugin does not exist.
Steps to reproduce
Create a standard Drupal 9, 10, and 11 site and enable this module on each. Using the default "article" content type, add an image. When prompted for alt text, use the name of the file and save. If this causes a validation error, use "image of (whatever)" as the alt text and save.
In Drupal 11, you are prevented from saving when using the name of the file for alt text, and a warning appears after saving with "image of..." as the alt text.
In Drupal 10, you are prevented from saving when using the name of the file for alt text, but no warning appears after saving with "image of..." as the alt text.
In Drupal 9, this immediately fails as the error is thrown and you cannot enter alt text.
Proposed resolution
Ensure validation behaves as expected in declared versions, or remove those versions from the declaration.
Issue fork alt_text_validation-3543006
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
Comment #3
swirtThanks Kpaxman for reporting this. I think I see what is happening on D10. I am going to remove D9 compatibility, that was a mistake listing it. it went end of life November 1, 2023
I should have this fixed shortly.
Comment #6
swirtThis is fixed. I will cut a new release in a few minutes.
Comment #7
swirtThis has been released with 1.0.1