I'm not sure how to go about this, but would it be possible to have the untruncated log entry title as a title attribute on reports/dblog? That way, you don't have to click on entries with long titles in order to find out what they are.

Comments

robloach’s picture

Version: 6.x-dev » 7.x-dev
Status: Active » Needs review
Issue tags: +Usability
StatusFileSize
new38.29 KB
new1.09 KB

I find this very helpful when the log entries are clipped. Here's both a patch and a screenshot....

aspilicious’s picture

I like this change, less clicks is always better
Code looks good.

Someone of the design team needs to give their opinion.
But in my opinion this can be labelled RTBC when bot is green.

moshe weitzman’s picture

why are we truncating the 'title' version? seems lie title version should get strip_tags as well since no browsers support tags in title popups

robloach’s picture

Is there a limit to how long an HTML title attribute can be? Also, does this protect against " and ' HTML injection?

Here's a related issue: #718662: DBLog listings truncate messages in the middle of HTML tags

cosmicdreams’s picture

Status: Needs review » Reviewed & tested by the community

Tested this out in Chrome 5 beta. Worked great. I had a huge security warning when drupal 7 couldn't write to my .htaccess file. It was a real timesaver to not have to click on that link to see the actual warning.

This is one of those things that bugs admins a lot, but not frequently enough to file a formal complaint about. THANKS A TON!

webchick’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs accessibility review

I'd like to get the accessibility team to chime in here. Too often we go title crazy and it makes pages totally inaccessible for blind users.

Everett Zufelt’s picture

I notice questions in comments #3 and #4 without any answers. Don't really think this patch is RTBC before they receive responses.

If my understanding is correct this patch will set the title attribute of the anchor pointing to a blog post to the full title of the post when the title in the anchor's link-text is truncated. If so then I don't see a accessibility problem, just that some people won't have access to this additional information, which is mostly redundant anyway.

robloach’s picture

Priority: Normal » Critical
Status: Needs review » Needs work

Pushing to critical as it seems you can inject HTML within the log page. Try this using the PHP filter by Previewing a node, and then visit admin/reports/dblog:

  watchdog(0, "Injection?\">??</a>In your <b>face</b>!<a title=\"");
robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new46.2 KB
new1.25 KB

Wow, I need more coffee. You're suppose to be able to have HTML in the link contents, just not the title attribute. This patch uses strip_tags to remove the tags from the title attribute.

moshe @ #3:

why are we truncating the 'title' version? seems lie title version should get strip_tags as well since no browsers support tags in title popups

We don't want an HTML attribute that ends up being thousands of characters long. Like any code, we should not trust input, and protect against excessively long title attributes. This patch trims it to 256 characters, which seems like a reasonable amount (see screenshot). Without trimming, the hover tag just looks stupid.

Rob Loach @ #4:

Does this protect against " and ' HTML injection?

This patch uses strip tags to protect against HTML injection, and remove the tags from showing up in the title attribute.

Everett Zufelt @ #7:

I notice questions in comments #3 and #4 without any answers.

Well, that should just about do it!

Everett Zufelt’s picture

+1 here for accessibility. Kind of annoying that we can't offer a longer link-text for users who cannot access the tooltip, but it would be a lot of work for very little benefit.

dries’s picture

Priority: Critical » Normal

Lowering priority to 'normal'. Critical bugs are release showstoppers. This wouldn't hold back a release.

amc’s picture

#9: 466416.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Usability, +Needs accessibility review

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

mgifford’s picture

Status: Needs work » Needs review
Issue tags: +Accessibility
StatusFileSize
new1.04 KB

trying to keep up with core. there was a themable function added here.

I believe the required functionality is moved over but it needs to be checked.

Status: Needs review » Needs work

The last submitted patch, 466416-2.patch, failed testing.

mgifford’s picture

Issue tags: +simpletests

Simpletests need to be addressed. think the title is throwing off the verification.

mgifford’s picture

Version: 7.x-dev » 8.x-dev

We can put this in to the hopper for D8 at this point.

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new0 bytes

Update of patch for new file structure. It still needs new simpletests.

Status: Needs review » Needs work

The last submitted patch, 466416-3.patch, failed testing.

mgifford’s picture

Title: Allow Mouseover Title for dblog Entries » Add Mouseover Title for dblog Entries
Issue tags: -Accessibility

From AllySprint.

bowersox’s picture

I agree with Mike's un-tagging and comment. This issue is not an accessibility problem. The issue is a good enhancement idea that would help admins. If the tooltip is added using a title="" attribute, that would be fine. That is the feeling of us here at the Accessibility Sprint in Montreal.

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new915 bytes

re-roll.

Status: Needs review » Needs work
Issue tags: -Usability, -simpletests, -Needs accessibility review

The last submitted patch, 466416-22.patch, failed testing.

mgifford’s picture

Status: Needs work » Needs review

#22: 466416-22.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Usability, +simpletests, +Needs accessibility review

The last submitted patch, 466416-22.patch, failed testing.

fabianx’s picture

Category: feature » task

Sounds like a task to me.

mgifford’s picture

Issue summary: View changes
Issue tags: +Needs reroll

patch no longer applies.

benjf’s picture

Status: Needs work » Needs review
StatusFileSize
new1012 bytes

re-roll to move this to the Controller file.

Status: Needs review » Needs work

The last submitted patch, 28: 466416-28.patch, failed testing.

benjf’s picture

Status: Needs work » Needs review
StatusFileSize
new1 KB
new915 bytes

re-roll with a small fix, which should now pass the tests. Cottser++

fabianx’s picture

Status: Needs review » Reviewed & tested by the community

RTBC, looks great to me

tstoeckler’s picture

Status: Reviewed & tested by the community » Needs review

I think it only makes sense to add a title attribute if the message was actually truncated, i.e. if the truncating actually changed the message. Or is that too much of an edge case that it's not worth adding complexity for it?

star-szr’s picture

Issue tags: -Needs reroll
mgifford’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs accessibility review

I think it would be more consistent for the user if the title attribute was available regardless.

Alternatively we can address that in a follow-up issue. This has been an open & solvable issue for 5 years.

@tstoeckler we can open this up for longer if you think this needs more discussion.

tstoeckler’s picture

Nope, that totally works for me. :-)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed a4109b3 and pushed to 8.0.x. Thanks!

  • alexpott committed a4109b3 on 8.0.x
    Issue #466416 by mgifford, benjf, RobLoach | timtrinidad: Add Mouseover...

Status: Fixed » Closed (fixed)

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