#343 closed defect (bug) (fixed)
Profile links showing up in Syntax Highlighter blocks
Reported by: | gradyetc | Owned by: | nacin |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Make (Get Involved) / P2 | Keywords: | |
Cc: |
Description
The following links are wrapping words containing the "@" symbol in Syntax Highlighter blocks:
<a href="http://profiles.wordpress.org/" class="mention"></a>
For example:
http://make.wordpress.org/core/handbook/inline-documentation-standards/php-documentation-standards/.
Attachments (1)
Change History (17)
#1
@
11 years ago
- Summary changed from Profile links showing up Syntax Highlighter blocks to Profile links showing up in Syntax Highlighter blocks
#2
follow-ups:
↓ 4
↓ 7
@
11 years ago
The @ wrapping is a standard P2 thing, I believe. The incorrect linking likely comes from a custom plugin we use on make to modify it to link to profiles. Not sure why it's not linking to the actual name though.
Still, turning this off for the specific case might be best. What's the base level URL where this should be disabled for? /handbook?
#3
@
11 years ago
Yes, it's absolutely intentional, to provide twitter-style mentions (and notifications of said mentions) when using p2. Similar to using - symbol to make bulleted lists, o and x to make to do lists, etc.
#4
in reply to:
↑ 2
@
11 years ago
Replying to Otto42:
The @ wrapping is a standard P2 thing, I believe. The incorrect linking likely comes from a custom plugin we use on make to modify it to link to profiles. Not sure why it's not linking to the actual name though.
Still, turning this off for the specific case might be best. What's the base level URL where this should be disabled for? /handbook?
Wouldn't it be better to check if the mention is for a valid WP.org user? I took a quick glance through the P2 code and it looks like the URLs are links to terms in the p2_mentions_taxonomy
taxonomy. I don't see where terms are added but I'm assuming there linked to the users table somehow. If that isn't returning an actual profile link then why make it a link?
There are probably places inside /core/handbook/ where @mentions are desired -- e.g. comments.
#5
follow-up:
↓ 6
@
11 years ago
Define "valid wp.org user". :)
http://profiles.wordpress.org/since
http://profiles.wordpress.org/access
http://profiles.wordpress.org/see
http://profiles.wordpress.org/link
http://profiles.wordpress.org/global
http://profiles.wordpress.org/param
http://profiles.wordpress.org/return
Any word you can think of has probably been used. There's more than 7 million registered users.
#6
in reply to:
↑ 5
@
11 years ago
Replying to Otto42:
Define "valid wp.org user". :)
http://profiles.wordpress.org/since
http://profiles.wordpress.org/access
http://profiles.wordpress.org/see
http://profiles.wordpress.org/link
http://profiles.wordpress.org/global
http://profiles.wordpress.org/param
http://profiles.wordpress.org/return
Any word you can think of has probably been used. There's more than 7 million registered users.
Touché. I'll let you folks pick the appropriate solution, all I know is that these links are making the PHP inline doc standards hard to read. :)
#7
in reply to:
↑ 2
@
11 years ago
Replying to Otto42:
Still, turning this off for the specific case might be best. What's the base level URL where this should be disabled for? /handbook?
For the moment, it would be nice if you could disable it for the handbooks. Please. :)
The current comments in the handbooks will be going away, so it's not important that this functionality work for the handbooks.
#8
@
11 years ago
There's a new version of P2 (1.5.3) that was released on wordpress.org yesterday.
If the parent P2 theme on the make sites is also version 1.5.3, it could be something in the new version that triggered this.
#9
@
11 years ago
- Owner set to Otto42
- Resolution set to fixed
- Status changed from new to closed
In 400:
#10
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
r400 is a fine stop-gap, but I know what is causing this.
P2 by default requires that the user also be a member of the site in question, which more or less sidesteps these issues by sheer luck. I made a change to the make sites a few days ago that allowed any WP.org user to be matched, as it was something we wanted for make/core. However, P2's regex doesn't avoid code/pre and our special code (which was committed, kind of accidentally, to the private repo, do you won't see it in meta) doesn't exclude these PHPdoc tags or other common words. I'll see if both can occur.
I would agree that this should be avoided on the handbook in general as well.
#12
@
11 years ago
This is also causing an issue in the theme and plugin developer handbooks on Make/Docs.
I haven't checked the Docs handbook to see if this is an issue there.
As a temporary fix, could we get those handbooks added to the ignore P2 mentions list please?
#13
@
11 years ago
Example URL showing the problem:
https://make.wordpress.org/docs/theme-developer-handbook/theme-basics/theme-functions/#your-functions-php-file
This ticket was mentioned in IRC in #wordpress-meta by sams. View the logs.
11 years ago
#15
@
10 years ago
- Resolution set to fixed
- Status changed from assigned to closed
[972] took care of this more generally. The rest of this is more of an issue with P2, and I don't really feel like trying to monkey-patch it.
Actually it's more global -- looks like any "@" character followed immediately by text is assumed to be a WP.org profile mention. Especially noticeable on the aforementioned PHP Inline Docs page. Attaching a screenshot.