Should we be able to control the base path for all of our contact forms? I'm fine with having every form build off the route (currently /contact) if need be, because we can create aliases for new forms.

But what if I need to use the route /contact for something else entirely? (basic page, redirect to third party, etc)

Comments

gregbeat created an issue. See original summary.

boshtian’s picture

I also think that we should be able to configure this.

I have a different problem than you, but also addresses the option to create custom paths. We have aliases for users (eg. user/user-alias), but when you go on contact form you get user/[user-id]/contact. I would like to retain the pattern, so the url would be user/user-alias/contact.

I can see that the path in routing is '/user/{user}/contact'. So maybe we can create this a little more flexible.

rpataca’s picture

Experiencing the same issue with personal contact forms. (same as boshtian / #2)

Pathauto takes care of the user links like /view & /edit but not /contact.

User page alias is /about/our-team/firstname-lastname
Would love to have /about/our-team/firstname-lastname/contact as the contact page alias

gunwald’s picture

I think, the fact that you can't easily change the path /contact to something else is a very annoying limitation in various cases. But first of all it is in invitation to all spam bots. Thanks to that path, even the simplest bot knows, how to reach my contact form.
As a consequence I get dozen of spam mails every day although I have protected the form with the honeypot module.
As in my experience the best way to protect your self from spam users etc. is to change the default pathes, e. g. with the help of the "Rename Admin Paths" module, we need an option to easily change the contact form path.

On what is this very strange design decision based anyway?

kepesv’s picture

The module shouldn't occupy the /contact path..
Visit the /contact path:
For anonymous user got 404
For admin user got 404 with message: "The contact form has not been configured. Add one or more forms ."
What does it mean? The module occupy this valuable path for nothing and I can't use the /contact path for a custom contact page.
I think this is a design flaw.
(I can't turn off the contact module beacuse we are using it for other forms (not contact forms))

Version: 8.1.7 » 8.1.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

jastraat’s picture

Version: 8.1.x-dev » 9.0.x-dev

This is still an issue in Drupal 9.

Version: 9.0.x-dev » 9.1.x-dev

Drupal 9.0.10 was released on December 3, 2020 and is the final full bugfix release for the Drupal 9.0.x series. Drupal 9.0.x will not receive any further development aside from security fixes. Sites should update to Drupal 9.1.0 to continue receiving regular bugfixes.

Drupal-9-only bug reports should be targeted for the 9.1.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.2.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.1.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.