'Boardless' posting issue

Started by davo88, May 15, 2024, 10:08:21 PM

Previous topic - Next topic

davo88

SMF 2.1.4
- TinyPortal 3.0.0
- Forum Width Setting 1.2
- Ultimate Menu 2.0.2
- Quick New Topic Button 1.3
- Board Sorting Method 1.0.1
- Simple Audio Video Embedder 7.0.5
- Custom Form Mod 4.0.6
- Optimus 3.0 Beta
- Login Menu Button 2.0

Need a bit of help on how to track down what's causing an issue with 'boardless' posting as it has been called elsewhere. The issue first surfaced when using the Quick New Topic button mod, but it also happens when using the URL `.../index.php?action=post`.

The Issue
When logged in as a member and starting a post using either the Quick New Topic button or the URL `.../index.php?action=post`, the 'Post in' window always defaulted to board #1 - 'General Discussion'

You cannot view this attachment.

Then after the member selected board #44 and posted in there, the 'Post in' window started defaulting to board #44 - 'Forum Issues & News'

You cannot view this attachment.

I thought it was just defaulting to the last board chosen and that it would be a temporary thing. But even after the member posts back in board #1 again, the default board shown in the 'Post in' window is always board #44.

The really weird part is that it now does this for ALL regular members even though those members have never posted in board #44. But it never does it for an admin. After an admin posts in a board other than board #1, the 'Post in' window still defaults to board #1.

Exactly the same thing happens with different browsers, so it doesn't appear to be browser related.
I looked in the smf_settings table thinking the board ID might be saved in there somewhere but could not find '44'.

Any suggestions on how to go about troubleshooting this? Where could this board ID '44' be stored?

Diego Andrés

I can reproduce.
It's because boardsAllowedTo() doesn't have an ORDER BY statement


$request = $smcFunc['db_query']('', '
SELECT b.id_board, bp.add_deny' . ($simple ? '' : ', bp.permission') . '
FROM {db_prefix}board_permissions AS bp
INNER JOIN {db_prefix}boards AS b ON (b.id_profile = bp.id_profile)
LEFT JOIN {db_prefix}moderators AS mods ON (mods.id_board = b.id_board AND mods.id_member = {int:current_member})
LEFT JOIN {db_prefix}moderator_groups AS modgs ON (modgs.id_board = b.id_board AND modgs.id_group IN ({array_int:group_list}))
WHERE bp.id_group IN ({array_int:group_list}, {int:moderator_group})
AND bp.permission IN ({array_string:permissions})
AND (mods.id_member IS NOT NULL OR modgs.id_group IS NOT NULL OR bp.id_group != {int:moderator_group})' .
($check_access ? ' AND {query_see_board}' : ''),
array(
'current_member' => $user_info['id'],
'group_list' => $groups,
'moderator_group' => 3,
'permissions' => $permissions,
)
);

SMF Tricks - Free & Premium Responsive Themes for SMF.

Sesquipedalian

A fix for this will be included in 2.1.5.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

davo88


Advertisement: