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

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

Bhanu951 created an issue. See original summary.

andrew answer’s picture

Hi, 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)

nidhi27 made their first commit to this issue’s fork.

nidhi27’s picture

Status: Active » Needs review

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

agunjan085’s picture

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

agunjan085’s picture

Status: Needs review » Reviewed & tested by the community

andrew answer’s picture

Status: Reviewed & tested by the community » Fixed
nidhi27’s picture

Hi @Andrew,

Kindly give the credit as MR is merged to the module.

nidhi27’s picture

andrew answer’s picture

agunjan085’s picture

Hi @Andrew,

Kindly give the credit as the fix is working fine as tested.

andrew answer’s picture

Status: Fixed » Closed (fixed)

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