-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
PHP Version
8.2.10
CodeIgniter4 Version
4.4.1
Shield Version
1.0.0-beta.6
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
MariaDB 11.1
Did you customize Shield?
No
What happened?
When the shield routes are defined as following:
$routes->group('{locale}/account', static function($routes) {
service('auth')->routes($routes);
});some URLS are not generated correctly in the registration process:
- https://glossary.local/glossary/auth/a/show instead of https://glossary.local/glossary/fr/account/auth/a/show
- https://glossary.local/glossary/auth/a/verify instead of https://glossary.local/glossary/fr/account/auth/a/verify
Steps to Reproduce
- Rewrite the shield routes to include locale and a top level
- Try to register a new user
Expected Output
Correct redirection and form submitted to the right URL.
Anything else?
A possible solution is to make a fix in two files:
- In Controllers\RegistrerController.php:
change: return redirect()->to('auth/a/show');
into: return redirect()->route('auth-action-show'); - In Views\email_activate_show.php
change: <form action="<?= site_url('auth/a/verify') ?>" method="post">
into: <form action="<?= url_to('auth-action-verify') ?>" method="post">
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers