WordPress.org

Making WordPress.org

Opened 6 years ago

Closed 5 years ago

Last modified 2 years ago

#343 closed defect (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)

wporg-incorrect-mention-links.png (102.8 KB) - added by gradyetc 6 years ago.

Download all attachments as: .zip

Change History (17)

#1 @gradyetc
6 years ago

  • Summary changed from Profile links showing up Syntax Highlighter blocks to Profile links showing up in Syntax Highlighter blocks

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.

#2 follow-ups: @Otto42
6 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 @jenmylo
6 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 @gradyetc
6 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.

#6 in reply to: ↑ 5 @gradyetc
6 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 @kpdesign
6 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 @kpdesign
6 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 @Otto42
6 years ago

  • Owner set to Otto42
  • Resolution set to fixed
  • Status changed from new to closed

In 400:

Disable P2 Mentions on the core-handbook site. Fixes #343

#10 @nacin
6 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.

#11 @nacin
6 years ago

  • Owner changed from Otto42 to nacin
  • Status changed from reopened to assigned

#12 @kpdesign
6 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?

This ticket was mentioned in IRC in #wordpress-meta by sams. View the logs.


5 years ago

#15 @nacin
5 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.

This ticket was mentioned in Slack in #docs by sergey. View the logs.


2 years ago

Note: See TracTickets for help on using tickets.