discourse/app/models/concerns
Gerhard Schlager e17c145e8d
FIX: Category hashtags weren't always found for sub-sub-categories (#20156)
The algorithm failed to find the correct category by slug when there are multiple sub-sub-categories with the same child-category name and the first child doesn't  have the correct grandchild.

So, searching for "child / grandchild" worked in the following case, it found (3):

- (1) parent 1
  - (2) child
    - (3) grandchild
- (4) parent 2
  - (5) child
    - (6) grandchild

But it failed to find the grandchild in the following case:

- (1) parent 1
  - (2) child
- (4) parent 2
  - (5) child
    - (6) grandchild

And this also fixes a flaky spec by forcing categories to always order by by `parent_category_id` and `id`.
This makes it possible to partly revert 60990aab55
2023-02-03 12:17:52 +01:00
..
reports DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
anon_cache_invalidator.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
cached_counting.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
category_hashtag.rb FIX: Category hashtags weren't always found for sub-sub-categories (#20156) 2023-02-03 12:17:52 +01:00
has_custom_fields.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
has_destroyed_web_hook.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
has_sanitizable_fields.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
has_search_data.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
has_url.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
limited_edit.rb REFACTOR: Edit title respects min trust to edit post 2020-02-05 10:36:24 -07:00
positionable.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
roleable.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
searchable.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
second_factor_manager.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
stats_cacheable.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
topic_tracking_state_publishable.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
trashable.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00