Making WordPress.org

Opened 6 years ago

Closed 2 years ago

#4346 closed defect (bug) (fixed)

Support Forum: Embed loses fragment identifier

Reported by: joyously's profile joyously Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Support Forums Keywords: close
Cc:

Description

I put this URL into a forum reply, and the embed didn't have the fragment identifier.
https://wordpress.org/support/article/writing-posts/#visual-versus-text-editor

The link in the embed was to the page without the fragment ID, thus losing the specific detail that was wanted.

Could be related to #3916

Change History (9)

#1 @netweb
6 years ago

Confirmed

I added https://wordpress.org/support/article/writing-posts/#visual-versus-text-editor to https://wordpress.org/support/topic/test-helphub-urls/ (now archived). When editing that post the link is correct, though viewing the post embed the link is truncated to https://wordpress.org/support/article/writing-posts/

#2 @dd32
6 years ago

This ultimately comes back to a short-coming of the WordPress oEmbeds, bluntly fragments are not supported.

If you look at the resulting embed, it's something like this:
https://wordpress.org/support/article/writing-posts/embed/#?secret=...

I think there's two things in play here:
1) Core doesn't support Fragments, and should not embed URLs if they have fragments, and/or should support fragments (This needs to be filed on core.trac)
2) The Support Forum can probably work-around this and disable embeds for URLs which have a fragment specified.

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


5 years ago

#4 @tellyworth
5 years ago

Given point (1) this really should be reported upstream to Core.

#5 @tellyworth
5 years ago

  • Keywords reporter-feedback added

#6 @dd32
5 years ago

  • Keywords close added; reporter-feedback removed

Reported upstream as #core49682, Let's keep this ticket open for now to see what core does, it might still be best to disable the embedding of WordPress.org URLS for the support forums.

#7 @dd32
2 years ago

In #core49682 @zooini mentioned:

Replying to zoonini:

dd32 I noticed in the Meta ticket you said "it might still be best to disable the embedding of WordPress.org URLS for the support forums." – seems like that could be a great interim solution, since the core issue hasn't been fixed in three years. Is that something you'd consider at this point?

I guess three years later, with no upstream interest, looking at options for the support forums is reasonable.. Perhaps we should just disable oEmbeds on the support forums where anchors are included.

#8 @zoonini
2 years ago

@dd32 I think that could be a good solution, as it would solve the problem for any linked site, not just links to WordPress.org.

#9 @dd32
2 years ago

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

In 12094:

Support Forums: Don't oEmbed WordPress.org URLs which include anchors in the URL.

Fixes #4346.

Note: See TracTickets for help on using tickets.