Fixed Search results only show pm's

duderuud

Well-known member
Affected version
2.3
When using the default search (everywhere), searching a member only just shows PM's instead of all the content by that username
 
This actually blocks search working for guests entirely.

getTypePermissionConstraints needs to be significantly more complex than just:
PHP:
return [
new MetadataConstraint('recipients', \XF::visitor()->user_id)
];

This is how I've implemented it in my conversation improvements add-on:

PermissionConstraint/AndConstraint/TypeConstraint/NotConstraint are part of Search Improvements, and I never did endup making an SQL variant of those but it should be doable
 
Last edited:
Would assume this is semi related; but search in bookmarks doesn't work as well (at least on XF website; haven't tried 2.3 yet locally).
 
We've implemented a workaround here for this but the bug report is staying open for a more comprehensive fix.
 
Back
Top Bottom