You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
If the slug driver is set to something different than username, Flarum will crash with a javascript error when clicking the "Start private discussion" link on a user profile
Steps to Reproduce
Set user slug driver to ID
Visit any user profile
Use dropdown button to start private discussion with user
Error loosely transcripted from screenshot:
TypeError: Cannot read properties of undefined (reading 'id') at addDefaultRecipients (PrivateDiscussionComposer.js)
Expected Behavior
Should work with any slug driver.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Flarum version: 1.4.0
Extension version: master
Output of "php flarum info", run this in terminal in your Flarum directory.
Bug Report
Current Behavior
If the slug driver is set to something different than username, Flarum will crash with a javascript error when clicking the "Start private discussion" link on a user profile
Steps to Reproduce
Error loosely transcripted from screenshot:
Expected Behavior
Should work with any slug driver.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Possible solution(s)
byobu/js/src/forum/pages/discussions/PrivateDiscussionComposer.js
Line 107 in bc5dafa
I think just replacing
'username'
with'slug'
as the second parameter should fix it.This would probably be a good opportunity to gracefully handle
null
being returned bygetBy
even though it supposedly shouldn't happen.Additional Context
Based on report here https://discuss.flarum.org/d/4762-friendsofflarum-by-bu-well-integrated-advanced-private-discussions/1166
The text was updated successfully, but these errors were encountered: