Page with threads view and inbox block have two divs with the same ID

Created on 31 October 2024, 5 months ago

Problem/Motivation

The threads are always outputed inside a div with an ID like private-message-thread-<n>.
Here is the code:
https://git.drupalcode.org/project/private_message/-/blob/3.0.2/src/Enti...

A common usage of Private Message is to display a thread with the Inbox in a side bar. In this case, the HTML page will have two divs with the same ID, which is not correct.

Steps to reproduce

Display the Inbox block in a side bar, create a thread and check the HTML of the thread's page.

Proposed resolution

My proposal is to remove the ID of the thread when it's not the full view (meaning, the threads in Inbox won't have it).
AFAIK we are using the attribute "data-thread-id" for any JS manipulation, so I don't think this will have any impact.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇵🇹Portugal dxvargas

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024