Skip to content

#173 - Generate the URLs of the page displayed after the login and of the logo - #176

Merged
njoubert-cleverage merged 1 commit into
mainfrom
173
Oct 16, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
173

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #173.

  • LoginController: the target path of the login form (page displayed after the login) is generated from the dashboard route. It was /process: wrong when the routes are imported with a prefix: or the application is served from a sub-directory.
  • ProcessDashboardController: the logo URL (design.logo_path) is built by the Asset component (Symfony\Component\Asset\Packages, autowired): base path of the application, framework.assets.base_urls (CDN), version strategy; absolute URLs are kept as is. It is now escaped. It was '/'.$logoPath.
  • Require symfony/asset, now used directly (already installed by EasyAdmin).

Checked in process-bundle-demo (patch applied to the vendor), with the bundle routes imported with prefix: /admin:

  • main: _target_path = /process, the login redirects to /process → 404;
  • this branch: _target_path = /admin/process, the login redirects to the dashboard (200);
  • without prefix: same target path and logo URL as main.

Tests: functional test from a sub-directory (/app/process/login → _target_path = /app/process), unit tests of the logo URL (sub-directory, absolute URL, CDN base URL, escaping). With coverage (pcov): no risky test, no new uncovered line.

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None: same URLs without route prefix, sub-directory nor assets base URL. New ProcessDashboardController constructor argument (autowired, before the optional $logoPath): only a subclass calling the parent constructor would be affected.

🤖 Generated with Claude Code

… the logo

- LoginController: the target path is the URL of the dashboard route
  (was /process: wrong with a route prefix or a sub-directory).
- ProcessDashboardController: the logo URL is built by the Asset component
  (Packages: base path, assets base URLs, version strategy; absolute URLs
  kept as is), and escaped (was "/" + logo_path).
- Require symfony/asset, now used directly (already installed by
  EasyAdmin).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@njoubert-cleverage
njoubert-cleverage merged commit 04ae387 into main Oct 16, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hard-coded URLs: redirection after login and logo wrong with a route prefix, a base path or an assets base URL

1 participant