Problem/Motivation
Module Info Entity accepts non existing module machine names.
Steps to reproduce
Try to add no existing modules in module info add page. It should throwing error for non existing modules but it is saving data.
Proposed resolution
check for module existence before saving , one way it can be handled is by checking response code of http client.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Screenshot from 2023-06-20 20-34-23.png | 118.23 KB | agunjan085 |
| #6 | Screenshot from 2023-06-20 20-37-39.png | 98.73 KB | agunjan085 |
| #6 | Screenshot from 2023-06-20 20-42-45.png | 127.74 KB | agunjan085 |
Issue fork modules_info-3318703
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:
- 3318703-module-info-entity
changes, plain diff MR !5
Comments
Comment #2
andrew answer commentedHi, thank you for checking. Can you provide the good-qualified patch? This will be a real contribution (compared to https://www.drupal.org/project/modules_info/issues/3318676#comment-14794039)
Comment #5
nidhi27For this issue I have added the constraint to machine name field which will check before the saving of the entity.
Created #MR5 for the same.
Comment #6
agunjan085 commentedI have verified MR https://git.drupalcode.org/project/modules_info/-/merge_requests/5 on Drupal9 as on Drupal10 i was facing https://www.drupal.org/project/modules_info/issues/3366016
I was able to add dummy machine names before.
After taking the MR code on save it is not letting us save dummy module machine name.
Comment #7
agunjan085 commentedComment #10
andrew answer commentedComment #11
nidhi27Hi @Andrew,
Kindly give the credit as MR is merged to the module.
Comment #12
nidhi27Comment #13
andrew answer commentedComment #14
agunjan085 commentedHi @Andrew,
Kindly give the credit as the fix is working fine as tested.
Comment #15
andrew answer commented