Skip to content

fix(LocaleSelect): Use request.path instead of helpers.url_for#3997

Merged
tvdeyen merged 1 commit into
AlchemyCMS:mainfrom
halfbyte:another-url-for
Jun 19, 2026
Merged

fix(LocaleSelect): Use request.path instead of helpers.url_for#3997
tvdeyen merged 1 commit into
AlchemyCMS:mainfrom
halfbyte:another-url-for

Conversation

@halfbyte

Copy link
Copy Markdown
Contributor

What is this pull request for?

This fixes an adjacent bug to #3974 - I didn't find this in my repro
at the time as this is only shown when more than one locale is used.

I've grepped through the code and at least in the view components there
don't seem to be any other usages of the argless url_for

If you want to take a look, I've updated my repro.

Notable changes (remove if none)

Uses request.path instead of an argless url_for to get the URL path for the current page for the form action URL in the component.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@halfbyte halfbyte requested a review from a team as a code owner June 19, 2026 13:31

@tvdeyen tvdeyen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! Thanks :) Would you mind to squash the test commit into the actual fix? Thanks 🙏🏻

@tvdeyen tvdeyen added bug backport-to-8.2-stable Needs to be backported to 8.2-stable labels Jun 19, 2026
This fixes an adjacent bug to AlchemyCMS#3974 - I didn't find this in my repro
at the time as this is only shown when more than one locale is used.

I've grepped through the code and at least in the view components there
don't seem to be any other usages of the argless `url_for`

If you want to take a look, I've updated [my repro](https://github.com/halfbyte/alchemy_repro).
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.12%. Comparing base (023e160) to head (58d8a6a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3997   +/-   ##
=======================================
  Coverage   98.12%   98.12%           
=======================================
  Files         346      346           
  Lines        8974     8974           
=======================================
  Hits         8806     8806           
  Misses        168      168           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdeyen tvdeyen merged commit 74501f4 into AlchemyCMS:main Jun 19, 2026
28 checks passed
@alchemycms-bot

Copy link
Copy Markdown

💚 All backports created successfully

Status Branch Result
8.2-stable

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-8.2-stable Needs to be backported to 8.2-stable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants