Smart Redirects Manager detects 404 errors on a site, records hit statistics, and suggests redirect targets so site builders can fix broken URLs from a single admin dashboard. It integrates with the Redirect module: fixes are created as regular Redirect entities.

The module logs every 404 (total, daily and weekly counts, 14-day trend, priority level, last seen, per-referer breakdown) and ranks candidate targets by fuzzy/keyword matching against valid paths collected from several sources: URL aliases, nodes, taxonomy terms, routes, Views page displays and the site's sitemap.xml. From the dashboard, a modal lets administrators review the suggestions and create a redirect in one click. Bulk actions, exclusion patterns (glob or regex), an ignore workflow, an import of past 404s from the watchdog log and a Drush command are also provided.

The goal is to make fixing broken URLs fast and safe on sites with frequent content changes or migrations, while keeping SEO under control.

Project link

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

Comments

elfifou created an issue. See original summary.

vishal.kadam’s picture

Issue summary: View changes
avpaderno’s picture

Issue summary: View changes

Thank you for applying!

Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.

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 enable GitLab CI for the project and fix the PHP_CodeSniffer errors/warnings it reports.
  • 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 will not be changed by this application; once this application is closed, you will be able to change the project status from Not covered to Opt into security advisory coverage. This is possible only 14 days after the project is created.

    Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
  • Only the person who created the application will get the permission to opt projects into security advisory coverage. No other person will get the same permission from the same application; that applies also to co-maintainers/maintainers of the project used for the application.
  • 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 project moderator before posting the first comment on newly created applications. Project moderators will do some preliminary checks that are necessary before any change on the project files is suggested.
  • For the tools to use for reviewing a project, see Tools to use for reviews.
  • It may be best to have the applicant fix things before further reviews and avoid doing a review when another review is pending.

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.

elfifou’s picture

Note for reviewers: I merged one contributor commit into 1.0.x shortly after opening this application: c54a4f3 (Issue #3622726, CSV export, by shank115). The issue and its merge request predate this application (MR opened on 14 September); I reviewed it and asked for changes before merging, but I had missed the "only your commits" rule.

I won't merge any other contribution while this application is open.
If you prefer, I can revert that commit now and merge it again once the
application is closed.

avpaderno’s picture

@elfifou There is no need to revert the commit done in #3622726: Add CSV export of the 404 list.

elfifou’s picture

Thanks @avpaderno.

Before the first review, I applied a few changes to 1.0.x that reviewers usually ask for:

- Hooks are now implemented in an autowired class with #[Hook] attributes, with #[LegacyHook] wrappers for Drupal < 11.1, and core_version_requirement is ^10.3 || ^11.
- The settings form uses #config_target (with a new kernel test).
- The Drush command moved to src/Drush/Commands, without drush.services.yml.
- GitLab CI also runs against Drupal 12 (OPT_IN_TEST_NEXT_MAJOR); the deprecations reported for this module are fixed.

All jobs pass on the current 1.0.x; the remaining Drupal 12 deprecations come from the Redirect module.

vishal.kadam’s picture

Status: Needs review » Needs work

FILE: templates/dashboard.html.twig

<h2 class="title">Smart Redirects Manager Dashboard</h2>

Strings shown in the user interface must be translatable.

elfifou’s picture

Status: Needs work » Needs review

Thanks @vishal.kadam!
Fixed in 1.0.x (a31f524). I went through all three templates rather than only the dashboard title:

  • The dashboard title and the search placeholder are now translatable.
  • Labels keep their colon or count inside the translatable string, and the referer count uses a plural form, so translators control word order and punctuation.
  • The manual redirect link was hard-coded; it is now built with path(), so it gets the language prefix and base path.

While checking the code on older PHP versions, I also fixed typed class constants that required PHP 8.3 although the module supports Drupal 10 on PHP 8.1 and 8.2 (5d1406b).