Reverts the removal of this from
https://github.com/discourse/discourse-calendar/pull/231. This opens up
the relative url `/discourse-post-event/events.ics` for access to an
ical formatted response.
We also make available the `order` argument for this endpoint which
defaults to ascending order if there is no value or invalid value
passed. This maintains existing behaviour while allowing for users to
specify that they want most recent events first.
If you have a watched word with a wildcard and then enable the "watched
words regexp" site setting, you might end up in a situation where you
can't post anymore because of the invalid regexp.
This ensures we correctly skip invalid regexps.
Ref - https://meta.discourse.org/t/-/382417
When a post is edited, avoid re-flagging it if there’s already a flag
pending in the review queue. This prevents duplicate triage runs and
reduces unnecessary processing.
This eliminates mobile/login-signup-page.scss and
desktop/login-signup-page.scss in favor of breakpoints in
common/base/login-signup-page.scss
There are a few large blocks within breakpoints that didn't have a
suitable place to merge into the existing common styles, so this file
can use some more cleanup... but this gets everything centralized to
start, and shouldn't result in any major visual changes.
Tested on desktop/ipad/mobile.
The `discourse_owned?` method in `lib/plugin/instance.rb` was calling
`.split` on `parsed_commit_url.path` without checking if the path could
be nil. This caused a 500 error on `/admin/plugins` when any plugin had
a commit URL that parsed successfully but returned a nil path (e.g.,
plugins without a git remote configured).
Added a nil check for `parsed_commit_url.path` to gracefully handle this
edge case and prevent the crash. Also added a test case to verify the
method returns false when the parsed URL has a nil path.
The version parameter of the JS plugin-api has never really been used
properly. These days, themes and plugins use the
`.discourse-compatibility` system for defining compatibility with core,
and we made the plugin-api version argument optional in
acad83199e.
This commit removes the internal infrastructure which supported the
versioning system. There is no change to the API. Any passed version
numbers will be ignored.
This commit splits the `moderators_manage_categories_and_groups` setting
into 2 separate settings to allow for more precise control over
categories and groups management by moderators.
Internal topic: t/141392.
Follow-up to 0bc18fdf78
The `before` hooks were arragned in such a way that we were visiting the
admin user page first before the site setting was updated.
These specs are to ensure category names remain translated when
navigating around.
In a future PR there will be a fix for logged in users, where category
names get overridden in the local store due to async requests updating
the category names in store.
1 of 2.
/t/163217
In a previous refactor we lost the functionality that creates a reviewable when a moderator immediately takes action on a post and chooses to either silence or suspend a user.
This commit allows editing colors of palettes that are installed with
themes. Prior to this commit, editing colors of theme-owned palettes wasn't
allowed because a theme update could override the edits made by admins
and there was no way to revert edits to the original values. With this
commit, all of that is solved by copying the palette when it's first edited
by an admin, and making future updates to the theme update the original
copy only with the ability for admins to revert to the colors in the
original copy at any time.
Internal topic: t/162130.
Cleanup task to remove the recursive option from the category link
helper.
This was mostly replaced with the additional of the `ancestors` option
in #26638, this PR removes the last instance of where it was used and
removes it from the helper.
Before this change, every update to the `searchTerm` tracked property would create a new promise in the `data` function. The issue was that once the debounce delay completed, only the most recent promise would be handled, leaving the other promises in a limbo state. This is problematic because we pass these promises to TrackedAsyncData, which registers a test waiter in the test environment. If promises are never settled, the test waiters will never complete, causing tests to hang indefinitely.
In our efforts to increase the signal-to-noise ratio and discoverability of site settings, we're hiding overly technical settings that few users override.
c.f. https://github.com/discourse/discourse/pull/34945
This commit updates `PostRevisor` to bump a topic if the
edited post is a wiki post and it is also the first post in
the topic (OP).
In this case, people want to know about a
change to the OP, because it may need to be reviewed (in the case of a
wiki) or it should be “promoted” so that others can see what’s changed
(in the case of general documentation).
A related change in this commit is to add a `should_bump_topic`
plugin modifier, so plugins like Discourse Doc Categories
(see https://meta.discourse.org/t/discourse-doc-categories/322376)
can enforce bumping in certain cases.
The settings text doesn't reflect reality, as wide rectangular logo isn't a requirement. A square one works just as well, and is recommended to optimise header space.
In the current version of DiscourseHub on iOS 26, video uploads are stalling.
This is because the video thumbnail generation code relies on video events and it looks like iOS 26 webviews are not firing those events.
This may require a fix in DiscourseHub, but in the meantime, we need to tighten the logic in thumbnail generation here.
Examples:
* Run only the "badges" and "users" steps in the converter:
```
migrations/bin/cli convert discourse --reset --only=badges,users
```
* Run all steps except "users" in the converter:
```
migrations/bin/cli convert discourse --reset --skip=users
```
* Run only the "badges" step in importer:
This also runs all steps that "badges" depends on (e.g. "users" and "uploads").
```
migrations/bin/cli import --reset --only=badges
```
* Run only the "badges" step in importer and skip the "users" on which "badges" depends:
```
migrations/bin/cli import --reset --only=badges --skip=users
```
- Rename SSO -> DiscourseConnect. SSO is the general term for all
external login methods. DiscourseConnect is the name for this protocol
- Allocate different IP for each parallel spec environment, so they
don't clash. This will resolve some flaky specs we're seeing
- Only bind to localhost. No need to make this available from other
machines
The badge in `CategoryChooser` is incorrectly showing the child category
badge when displaying both parent and child as the selected option. This
was already fixed for cases where the `ancestors` option is passed to
`categoryBadgeHTML` in the category link helper.
Updating the option within CategoryChooser fixes this issue, but I have
also added a fallback fix for any other components that still use the
recursive option.
_Note: as part of #26638 the preferred approach was to pass `ancestors:
category.predecessors` in place of `recursive: true`. That way reducing
multiple calls to `Category.findById` at the component level when
looping through category parents. We may want to completely remove the
recursive option in the future but leaving it be for now._
### Before
The category emojis are working correctly on the top header:
<img width="448" height="68" alt="Screenshot 2025-10-03 at 2 44 02 PM"
src="https://github.com/user-attachments/assets/f929cebf-3523-40cd-ac44-4c8d240793d5"
/>
The category chooser is showing the incorrect emoji for the parent
category when editing the topic:
<img width="430" height="159" alt="Screenshot 2025-10-03 at 2 43 55 PM"
src="https://github.com/user-attachments/assets/a7ed5cff-db10-4899-8096-45bd2b882eea"
/>
### After
<img width="451" height="153" alt="Screenshot 2025-10-03 at 2 43 02 PM"
src="https://github.com/user-attachments/assets/6033c164-3451-4526-8ff0-29819f8ae3d7"
/>
We can't enable `Rails/WhereNot` lint/autofix, because it would break
code that uses mini_sql instead of AR (which rubocop, and tbh also we,
can't easily differentiate)
Those are safe because they either:
* are executed in AR model scope definitions
* are clearly chained starting from a AR model
* are less-clearly chained, but still can be traced to a AR model/scope
---------
Co-authored-by: Loïc Guitaut <loic@discourse.org>
This commit adds a new setting `moderators_change_trust_levels` to
control whether moderators are allowed to change trust level of users.
Moderators are currently allowed to change trust levels, so this new
setting is enabled by default to avoid sudden changes in behavior for
existing sites.
When the setting is disabled and moderators are not allowed to change
trust levels, they see the trust levels dropdown disabled.
Internal topic: t/141392.
---------
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
**Description**
Add an option to ignore orphaned posts since these can cause errors when
running the task like:
```
ERROR:
duplicate key value violates unique
PG:: UniqueViolation:
DETAIL: Key (topic_i, post_number, user_id)=(212064, 1, 33887) already exists.
```
This PR uses MessagePack instead of JSON for serializing our cookies.
MessagePack is almost as fast as Marshal but without the security
issues. It’s also able to serialize more objects than JSON (like Time,
Symbol, etc.). As it’s a binary format, it takes less space than JSON,
sometimes half less. Finally, MessagePack isn’t Ruby-specific and
implementations exist in every existing language.
Regarding the cookies Discourse is using, we can see a small improvement
on the `_forum_session` one when it’s almost empty (around 2%), but the
more things are put into it, the more we’ll see savings. For the `_t`
cookie, we’re saving around 20% for free.