Previously when changing back to the same email (ie. change to new
email, then change back again) we can easily end up showing the
incorrect old email if changing back to the same email more than once.
Then passing the incorrect old email causes an error as it can't be found.
This happens because we only searched for a combination of `user_id` and
`new_email` which can load an older change from the database. By using
the current email address when finding / initializing the
`EmailChangeRequest` we can prevent this issue as we will be creating a
new entry rather than loading an outdated one.
We just added this site setting to be used for switchover as we merge a theme component into core. However, as it wasn't marked client: true, the theme component cannot read it. 🤦
In this PR, test was removed
https://github.com/discourse/discourse/pull/32639
To be sure result are consistent, we need to define a data set which
will confirm that the page is getting bonus points.
When Translation Overrides are changed, a message is sent on the
`/i18n-flush` channel to ensure all running unicorns flush their caches.
This message is not received in a database-specific context, so running
`ExtraLocalesController.clear_cache!` was only affecting the default
site in a multisite cluster. This commit updates it to flush caches for
all sites.
When we create a custom homepage using the `custom_homepage` modifier we
can hide the sidebar using `{{hideApplicationSidebar}}` in the template
— this forces the hamburger dropdown to appear in the header.
This creates an issue when navigating from the custom homepage to the
admin area, because when the route transitions the hamburger menu isn't
closed... and at this point, it cannot be closed at all. The
`clickOutside` listener from the open menu is calling
`toggleNavigation`, which is now the sidebar... so instead of closing
the hamburger menu, it toggles the sidebar and prevents other elements
from being clicked (because the `clickOuside` listener is only removed
when the hamburger menu is destroyed).

This change ensures that when the admin sidebar is forced, the hamburger
menu will be hidden.
## 🔍 Overview
This update adds the ability for users to manually add translations to
specific posts. It adds a 🌐 icon on the post menu where you can click to
add translations for posts.
It also introduces a new site setting:
`content_localization_debug_allowed_groups` which is convenient when
debugging localized posts. It adds a globe icon in the post meta data
area along with a number of how many languages the post is translated
in. Hovering over the icon will show a tooltip with access to editing
and deleting the translated posts.
## 📸 Screenshots
<img width="1234" alt="Screenshot 2025-05-07 at 13 26 09"
src="https://github.com/user-attachments/assets/9d65374d-ee3e-4e8b-b171-b98db6f90f23"
/>
<img width="300" alt="Screenshot 2025-05-07 at 13 26 41"
src="https://github.com/user-attachments/assets/6ee9c5e6-16ed-4dab-97ec-9401804a4ac8"
/>
The new themes listing page at `/admin/config/customize/themes`
currently has poor performance compared to the components page
(`/admin/config/customize/components`) due to various N+1 issues,
loading all themes and components from the server when only themes are
needed, and serializing data/attributes that aren't needed for rendering
the themes grid.
This commit improves the performance by eliminating all N+1 that are
currently present, excluding components from the page payload, and
reducing the amount of data transmitted for each theme when loading the
page.
If a user was using invalid values for the contract we would return
"Unexpected error", which is incorrect given we know the exact error.
The user will now get the following exception: "Page size must be less
than or equal to 50"
This PR addresses a problem with the Xenforo importer.
Xenforo has moved from "likes" table and now calls the same table
"reactions" table. Similarly the columns has been also renamed.
With this PR, the importer is upgraded to use the latest naming.
Signed-off-by: Abhiram Shibu <abhiramshibu1998@gmail.com>
Users won't be able to use video locally but we think it's not necessary
for now. This could also cause permissions errors on CI as deps require
sudo to be installed.
This commit makes various changes and improvements to the new color palettes
page that was introduced in
https://github.com/discourse/discourse/pull/32379. Specifically, it:
* Removes the ‘Logos and fonts’ banner
* Removes the icon from the palette names in the list
* Moves the ‘new’ button to the top of the palette list
* Excludes theme-owned color palettes from the color palettes page since
these will be editable directly from the theme page
* Makes the name the primary text if a color has no description
* Adds a button next to the name field to save just the name
* Adds a ‘Delete’ button alongside the existing ‘Duplicate’ button
* Adds a ‘Revert’ button to change a modified color back to its default
value (based on the base palette of the palette)
Similar to https://github.com/discourse/discourse/pull/32526.
Reviewer note: There had been some deliberation if we should just take
the `topic.first_post.locale` instead of having a `topic.locale`.
Ultimately, titles may be of a different language of the post itself,
and secondarily in some cases it could be faster without having to load
the first_post at all.
Modernizes the renderGlimmer API to use Glimmer components, replacing
deprecated ember-cli-htmlbars templates. Adds deprecation warnings for
invalid parameters and improves compatibility with the new Glimmer Post
Stream API.
We have had multiple issues while using the chrome channel:
- super slow start of the spec, I can confirm I don't have it on
chromium
- more risk of different failures between local dev machines and CI
There was a test not working on chromium, as it doesn't have mp4 codecs
out of the box. I changed the spec to use webm instead and it's now
working correctly.
This commit also fixes a bug with the video/trace paths which were
incorrect, and also makes another test less flakey with uploads event
though Im not very clear on what is going on here, we need to dig this.
We now need to figure out a way to have this on the test image, but this
is for now a better solution.
Chat is currently broken in local development if anonymous mode is enabled in site settings. This is happening after #32416. One of the strict_loading directives in ChannelFetcher is trickling down to an anonymous user check.
We don't need to enforce strict_loading on this 1-to-1 association that's only used in a few code paths, so mark it as strict_loading: false on the User model.
This PR replaces the set of methods related to validation and
normalization of input values in the select-kit utils mixin with simple
exported functions from a input-utils lib file.
We maintain the `_normalize` method on the select-kit component because
there are external repos dependent on that part of the interface.
We'll replace the remainder of the mixin with another utils lib file in
a separate PR.
Instead of simple match keywords, search login was a bit enhanced by calculating score.
20 points if item label starts with searched phrase. This is to prioritize automation when auto is typed;
10 points for each exact word matches keywords. This is to prioritize discourse-ai when ai is typed;
5 points if matches fallback to original phrase match.
In addition, stop showing loading sign when modal is opened.