Skip to content

[6.2] Add dynamic "Active User Only" author filtering#48086

Open
Reda-Muhamed wants to merge 2 commits into
joomla:6.2-devfrom
Reda-Muhamed:finder-active-user-only
Open

[6.2] Add dynamic "Active User Only" author filtering#48086
Reda-Muhamed wants to merge 2 commits into
joomla:6.2-devfrom
Reda-Muhamed:finder-active-user-only

Conversation

@Reda-Muhamed

@Reda-Muhamed Reda-Muhamed commented Jul 13, 2026

Copy link
Copy Markdown

Pull Request resolves # .

Summary of Changes

This PR adds an optional Active User Only mode to the Smart Search (com_finder) filter author section.

Existing static author filtering remains available and unchanged. Administrators can still select one or more specific authors as before. When the new option is disabled, the filter behaves exactly as it did before this PR.

When Active User Only is enabled, the filter becomes dynamic for the Author branch. Instead of storing a fixed author selection, Smart Search resolves the currently logged-in user’s Author taxonomy node when the search query is processed.

This allows a single Smart Search filter, for example “My Articles”, to show content authored by the current user.

How it works

The filter stores an active_user_only flag in the filter params.

When the flag is disabled:

  • author checkboxes are shown
  • selected author taxonomy nodes are saved normally
  • existing static author filtering behavior is preserved

When the flag is enabled:

  • static Author branch selections are ignored/removed from the saved filter data
  • the current user’s Author taxonomy node is resolved at search time
  • if the current user has no Author taxonomy node, the filter returns no results

Testing Instructions

  1. Log into the Joomla administrator.
  2. Ensure there are at least two users who have authored indexed articles, for example User A and User B.
  3. Go to Components -> Smart Search -> Index.
  4. Click Index to make sure author taxonomy nodes are created.
  5. Go to Components -> Smart Search -> Filters.
  6. Create a new filter.
  7. Expand the Search by Author section.

Static author filtering

  1. Leave Active User Only set to No.
  2. Select a specific author from the author checkbox list.
  3. Save the filter.
  4. Create or edit a menu item of type Smart Search -> Search and assign this filter.
  5. On the frontend, perform a search.
  6. Confirm that results are limited to the selected static author.

Dynamic active-user filtering

  1. Edit the filter again.
  2. Set Active User Only to Yes.
  3. Save the filter.
  4. Log into the frontend as User A and perform a search.
  5. Confirm that results only show content authored by User A.
  6. Log out, then log in as User B.
  7. Perform the same search.
  8. Confirm that results only show content authored by User B.

User with no authored content

  1. Log into the frontend as a user who has no indexed authored content.
  2. Perform a search using the same filter.
  3. Confirm that no results are returned.

Actual result BEFORE applying this Pull Request

Smart Search author filtering was static only. Administrators could select fixed author taxonomy nodes, but could not create one reusable filter that automatically matched the currently logged-in user.

Expected result AFTER applying this Pull Request

Static author filtering continues to work as before.

Administrators can optionally enable Active User Only to make the Author branch dynamic. In that mode, Smart Search resolves the current user’s Author taxonomy node during query processing. If the current user has no indexed authored content, the filter returns no results.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:
  • No documentation changes for guide.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-6.2-dev labels Jul 13, 2026
@chmst chmst added the Feature label Jul 14, 2026
@brianteeman

Copy link
Copy Markdown
Contributor

This doesnt ADD dynamic author filtering it Replaces author filtering with dynamic author filtering

Either that is a bug in this PR or its a breaking change which causes the loss of useful functionality

Before this PR

image

With this PR

image

@brianteeman

Copy link
Copy Markdown
Contributor

I have tested this item 🔴 unsuccessfully on 6509a9f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48086.

@chmst

chmst commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

If you swich Active user only to "no" you can select the users?
But I agree that the switch should be "no" as default.

@Reda-Muhamed

Reda-Muhamed commented Jul 14, 2026

Copy link
Copy Markdown
Author

I have tested this item 🔴 unsuccessfully on 6509a9f

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48086.

Thanks Brian, the intention is to add dynamic author filtering, not replace the existing static author filtering. (I forgot and use the old PR description, but I updated it)
when Active User Only is disabled, the existing author checkbox list remains visible and works exactly as before. The dynamic behaviour will only apply when the new option is enabled.

@brianteeman

Copy link
Copy Markdown
Contributor

Then theactive user only must default to disabled

@chmst

chmst commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The filter shows the same selection as usual but adds a button. It is disabled by default

grafik

@Reda-Muhamed

Copy link
Copy Markdown
Author

Then theactive user only must default to disabled

the default option is "no"

@brianteeman

Copy link
Copy Markdown
Contributor

weird - just rechecked and it is disabled - no idea why i thought it was not

@brianteeman

Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on 6509a9f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48086.

1 similar comment
@CSGoat0

CSGoat0 commented Jul 17, 2026

Copy link
Copy Markdown
Member

I have tested this item ✅ successfully on 6509a9f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48086.

@richard67

Copy link
Copy Markdown
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48086.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Language Change This is for Translators PR-6.2-dev RTC This Pull Request is Ready To Commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants