The Structure Map module helps you to visualize the structure of your entities
and bundles. Including the basic entiry information, editorial permissions,
display modes, field settings, etc.

The primary use case for this module is to provide a simple way to understand
a site architecture. This is specially helpful when you have a complex site
with many entities and bundles and you need to capture the current architecture
of the site.

Project link

https://www.drupal.org/project/structure_map

Comments

AlvaroDeMendoza created an issue. See original summary.

vishal.kadam’s picture

Thank you for applying!

Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

The important notes are the following.

  • If you have not done it yet, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
  • For the time this application is open, only your commits are allowed.
  • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
  • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

To the reviewers

Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.

The important notes are the following.

  • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
  • Reviewers should show the output of a CLI tool only once per application.
  • It may be best to have the applicant fix things before further review.

For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.

alvarodemendoza’s picture

Status: Needs review » Active
vishal.kadam’s picture

Issue summary: View changes
vishal.kadam’s picture

Remember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.

alvarodemendoza’s picture

Status: Active » Needs review

Reviewed coding standards and log warnings.

vishal.kadam’s picture

Status: Needs review » Needs work

1. 1.0.x-dev is a wrong name for a branch. Release branch names always end with the literal .x as described in Release branches.

2. Fix phpcs issues.

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml structure_map/

FILE: structure_map/src/StructureMapTable.php
-------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------
 167 | ERROR | The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
 185 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
 239 | ERROR | The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
 256 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------
alvarodemendoza’s picture

@vishal.kadam do you mean that I have to remove the 1.0.x-dev branch from drupalcode?
Let me know how to proceed with the branch because I just followed the instruction on the version control page of the module, that were to first create the 1.0.x, push and then create the 1.0.x-dev and push.

For the phpcs, my local is not getting that for the arrays so I just fixed based on the info you posted here.

Thank you,

vishal.kadam’s picture

Yes, you have to remove the '1.0.x-dev' branch.

alvarodemendoza’s picture

Status: Needs work » Needs review
vishal.kadam’s picture

Status: Needs review » Reviewed & tested by the community

Rest looks fine to me.

Let’s wait for a Code Review Administrator to take a look and if everything goes fine, you will get the role.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs review

Please, do not change the status to Reviewed & tested by the community if no manual review has been done.

While project moderators review applications, their main task is giving to the applicants the drupal.org role necessary to opt projects into security advisory coverage. This application is not waiting for a project moderator, but another person who makes a deeper review that does not involve any automatic tool.

avpaderno’s picture

As a side note, it will not be possible to opt this project into security advisory coverage, before July 18, 2024. The form element to do that is programmatically disabled for ten days after the project has been created.

vishal.kadam’s picture

Priority: Normal » Major

I am changing priority as per Issue priorities.

avpaderno’s picture

Priority: Major » Normal
Status: Needs review » Needs work
  • The following points are just a start and don't necessarily encompass all the changes that may be necessary
  • A specific point may just be an example and may apply in other places
  • A review is about code that does not follow the coding standards, contains possible security issues, or does not correctly use the Drupal API; the single points are not ordered, not even by importance

src/Controller/StructureMapController.php

I would rather not use ControllerBase as parent class, since it is not using any method from that class. Controllers do not need to have a parent class; as long as they implement ContainerInjectionInterface, they are fine.

src/Form/StructureMapFilterForm.php

  /**
   * Constructs the EntityDiagramController.
   *
   * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
   *   The EntityFieldManagerInterface service.
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
   *   The EntityFieldManagerInterface service.
   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
   *   The EntityTypeBundleInfoInterface service.
   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
   *   The route matcher service.
   */
  public function __construct(EntityFieldManagerInterface $entity_field_manager, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, RouteMatchInterface $route_match) {
    $this->entityFieldManager = $entity_field_manager;
    $this->entityTypeManager = $entity_type_manager;
    $this->entityTypeBundleInfo = $entity_type_bundle_info;
    $this->routeMatch = $route_match;
  }

The class is not EntityDiagramController.

src/EntityTypeInfo.php

          // Add the information to the summary.
          $field_type_summary .= '<br/>Number of entities using this reference field: ' . $entity_count;

Strings shown in the user interface must be translatable.

      $build['table_' . $display_mode] = [
        '#type' => 'table',
        '#prefix' => '<h4>' . $this->t('Display Mode: @label', [
          '@label' => htmlspecialchars($info['label']),
        ]) . '</h4>',
        '#header' => $header,
        '#rows' => $rows,
        '#attributes' => [
          'class' => [
            'form-display-table',
            'structure-map-table',
          ],
        ],
      ];

There is no need to pass a @-placeholder to htmlspecialchars(); that is already done by Drupal core.

alvarodemendoza’s picture

@avpaderno I fixed the things you flagged except for the ControllerBase because it is using the string translation trait in one side and I may implement other methods from that class as the project progresses.

alvarodemendoza’s picture

Status: Needs work » Needs review
rushikesh raval’s picture

Priority: Normal » Major

I am changing priority as per Issue priorities.

alvarodemendoza’s picture

Any updates on this? Thank you,

alvarodemendoza’s picture

Priority: Major » Critical

I am changing priority to Critical as per Issue priorities.

aneeshthankachan’s picture

I have reviewed this module and features after installing it. This works as expected in terms of the features, and is quite useful to document and understand different entities used within a Drupal application.

samberry’s picture

Status: Needs review » Reviewed & tested by the community

I have also reviewed this module and works as expected and is a great tool for gaining information about entity structures within a drupal application.

rushikesh raval’s picture

@aneeshthankachan and @samberry it is not review of module working. It review of code.

if you want to review application in this queue then go through following which will help you to review application.

Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

The important notes are the following.

  • If you have not done it yet, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
  • For the time this application is open, only your commits are allowed.
  • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
  • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

To the reviewers

Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.

The important notes are the following.

  • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
  • Reviewers should show the output of a CLI tool only once per application.
  • It may be best to have the applicant fix things before further review.

For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.

rushikesh raval’s picture

Status: Reviewed & tested by the community » Needs review
vishal.kadam’s picture

@aneeshthankachan and @samberry
To make the previous comment clearer: This application requires reviewers to review the project files and report what needs to be changed. We do not debug projects or verify their functionality.

klausi’s picture

Status: Needs review » Fixed
Issue tags: +ContributionWeekend2025

manual review:

  1. StructureMapFilterFormExport: exporting to the public file system is not ideal, because then you are showing that to any user? I think it is not a security issue because there is no secret data in the structure of your entity and fields? Ideally you would export to private files, then only authorized users can download the export file.
  2. The export files are never deleted? That could clutter disk space, probably makes sense to cleanup somewhere.

Looks good to me otherwise.

Thanks for your contribution, Álvaro!

I updated your account so you can opt into security advisory coverage now.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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