_forum_access_comment_view_alter() fails to preserve the order of comment links

Created on 4 December 2013, over 10 years ago
Updated 27 July 2023, 11 months ago

In the function _forum_access_comment_view_alter, we're checking permissions and adding/removing links from the comment links array. At the end of this process, we merge the old links with the new links using:

$links = array_merge($links, $old_links);

The problem with this approach is that it does not maintain the order of links. For example, I'm using the quote module. Because we re-order the links like this, the reply button appears on the left of the quote link, rather than at the far right.

πŸ› Bug report
Status

Closed: won't fix

Version

1.2

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada EAnushan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024