On line 1168 of privatemsg.module, there is a bug causing HTML validation failure of user pages in Drupal 7. The line currently reads $account->content['privatemsg_send_new_message'] = array( This causes the privatemsg link to be printed outside of any existing section, which means that its

and
tags are not within a
tag, failing validation. Instead, the line should probably be $account->content['summary']['privatemsg_send_new_message'] = array( . This displays the link in the same place, but is valid HTML.

Comments

berdir’s picture

Can you create this as a patch?

I've noticed this too but wasn't sure how to fix it. Speaking, I was not sure if we should create a new profile_category instead of using an existing one. I will have to try this out.

Thanks for testing :)

mamarley’s picture

StatusFileSize
new757 bytes

Here is the patch. I have also noticed in the privatemsg.theme.inc file there are a number of arrays with "weight => somenumber". These also fail validation, because for some reason the weight value shows up as an attribute to the th tag of the table. It is well beyond my skill level to fix this, however.

berdir’s picture

Status: Active » Needs review

Thanks, always set the status to needs review after you uploaded it, then it will be automatically tested by our test bot.

I will look into the weight issue, sound strange, never noticed that before...

BenK’s picture

Subscribing

berdir’s picture

Title: Bug in privatemsg_user_view on D7 causes HTML validation failure » Invalid HTML markup
StatusFileSize
new3.16 KB

Hm. The problem with your patch is that our private message thingy is below the User History group in the html. This is imho wrong.

This patch converts it to a simple link and doesn't use the user_profile_item stuff. What do you think?

The patch also fixes the mentioned weight issue, nice catch!

mamarley’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, fix_invalid_html.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new5.29 KB

Thanks for testing, fixed the test, so this should be good.

berdir’s picture

Version: 7.x-1.x-dev »
Status: Needs review » Patch (to be ported)

Commited, needs to be backported to 6.x-2.x later on.

berdir’s picture

Status: Patch (to be ported) » Fixed

Ported profile link to 6.x-2.x. The weight issue did not exist in this version because it is solved differently.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.