Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#46444 closed defect (bug) (fixed)

"Scribd block" doesn't work with any url.

Reported by: neobabis's profile neobabis Owned by: manzoorwanijk's profile manzoorwanijk
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.1
Component: Embeds Keywords: good-first-bug has-patch commit
Focuses: Cc:

Description

Describe the bug
I tried a lot of Scribd documents.
I copy the url of a Scribd document (not the shortcode) directly into a "Scribd block" but the return is "Sorry, we could not embed that content".
Urls is like: https://www.scribd.com/document/XXXnumbersXXX/TITLE-OF-DOCUMENT

To Reproduce
A solution is:

  1. Copy the Url https://www.scribd.com/document/XXXnumbersXXX/TITLE-OF-DOCUMENT
  2. Replace the word /document/ with /doc/
  3. Just paste the "new" Url to a Scribd block

But is this a real solution?

Screenshots

Attachments (2)

scribdBug.png (3.7 KB) - added by neobabis 6 years ago.
46444.diff (1.1 KB) - added by manzoorwani.jk 6 years ago.

Download all attachments as: .zip

Change History (10)

@neobabis
6 years ago

#1 follow-up: @swissspidy
6 years ago

  • Keywords Block Embed removed
  • Severity changed from major to normal

Hi there and welcome to Trac!

Do you have an example URL that we could use to test this? Perhaps https://www.scribd.com/document/... is a new format added by the provider. Because looking at https://github.com/WordPress/wordpress-develop/blob/315616aa5ed76c12d35d9f6fe40dd179c93d430d/src/wp-includes/class-oembed.php#L63, we only support the /doc/ version.

#2 in reply to: ↑ 1 @neobabis
6 years ago

Replying to swissspidy:

Hi there and welcome to Trac!

Do you have an example URL that we could use to test this? Perhaps https://www.scribd.com/document/... is a new format added by the provider. Because looking at https://github.com/WordPress/wordpress-develop/blob/315616aa5ed76c12d35d9f6fe40dd179c93d430d/src/wp-includes/class-oembed.php#L63, we only support the /doc/ version.

Hi @swissspidy and community!

All Documents by Scribd have the same results because of /document/.
Testing Urls by a quick search:
https://www.scribd.com/document/238730976/Internship-Report-on-web-development
https://www.scribd.com/document/209045571/Web-Development-Proposal-Template
https://www.scribd.com/document/234070393/Web-Development-and-Design

#4 @swissspidy
6 years ago

  • Keywords good-first-bug added

#5 @neobabis
6 years ago

Best community ever :-)

Thank you for your quick reply!

I am waiting for a future release.

@manzoorwani.jk
6 years ago

#6 @manzoorwani.jk
6 years ago

  • Keywords has-patch added; needs-patch removed

I have tested the patch with long URL format and it fixes the issue :)

#7 @swissspidy
6 years ago

  • Keywords commit added
  • Milestone changed from Future Release to 5.2
  • Owner set to manzoorwanijk
  • Status changed from new to assigned

Thanks for the patch @manzoorwanijk!

#8 @SergeyBiryukov
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 45024:

Embeds: Scribd: Add support for /document/ URL format, in addition to /doc/.

Props manzoorwani.jk, neobabis, swissspidy.
Fixes #46444.

Note: See TracTickets for help on using tickets.