Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Block: PDFs are shown as embeds only in the editor on Simple sites #52728

Closed
chad1008 opened this issue May 10, 2021 · 53 comments
Closed

File Block: PDFs are shown as embeds only in the editor on Simple sites #52728

chad1008 opened this issue May 10, 2021 · 53 comments
Assignees
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug User Report This issue was created following a WordPress customer report

Comments

@chad1008
Copy link
Contributor

chad1008 commented May 10, 2021

Steps to reproduce the behavior

  1. Go to My Site > Pages and create a new page
  2. Insert a file block
  3. Add a PDF to the block. You an upload or select from media library, either is fine
  4. The PDF link and download button are shown as expected
  5. Above those, an embed of the PDF is displayed
  6. Publish/update the page and view on fontend
  7. No embed, just link and button, as expected

What I expected to happen

The editor should match the front end, displaying only the link and download button

What actually happened

The two views have very different results, which is confusing.

Workarounds

Other methods to inline embed PDFs:

  1. Embed a PDF from Google Drive.
  2. Embed a PDF from OneDrive.
  3. Embed a PDF using Scribd.

Browser / OS version

Chrome 90.0.4430.93

Does this happen on simple or atomic sites or both?

Simple only

Screenshot / Video: If applicable, add screenshots to help explain your problem.

Screen Capture on 2021-05-10 at 15-27-45

@chad1008 chad1008 added [Type] Bug User Report This issue was created following a WordPress customer report labels May 10, 2021
@kosiew kosiew added the Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions label May 21, 2021
@kosiew
Copy link

kosiew commented May 21, 2021

Not transferring to Gutenberg as this affects Simple sites only.

@kosiew kosiew added the Triaged To be used when issues have been triaged. label May 21, 2021
@kwight kwight added the [Pri] Normal Schedule for the next available opportuinity. label May 27, 2021
@kriskarkoski
Copy link
Contributor

21646911-hc

Pasting on its own line allowed it to embed

@sophiegyo
Copy link

I encountered this in 30237796-hc - pasting the PDF URL directly into the editor was a suitable workaround.

@mrfoxtalbot
Copy link

I suspect this is not so much a bug, but a design gap.

By default, all file blocks will show just as a link and a button. The block was "improved" to show the PDFs "preview" but no option has given to keep it as a simple file link.

Ideally, I would advocate treating the PDF file as any other file and add an option in the block settings to "convert it to an embed".

Would this make sense @chad1008? Thank you!

@mrfoxtalbot
Copy link

Actually, I just re-tested this and there block already hast this toggle!

Kapture 2021-06-29 at 16 36 06

I am marking this as solved. Thank you!

@kriskarkoski
Copy link
Contributor

@mrfoxtalbot I'm reopening this as the issue is not with what's shown in the editor, but rather when the inline embed option is enabled it still shows as a link and button on the front-end rather than how it looks in the editor. Perhaps we should update the title/description to make the issue more clear?

@kriskarkoski kriskarkoski reopened this Jun 29, 2021
@mrfoxtalbot
Copy link

Thank you @kriskarkoski I got that the other way around. 😬

@mrfoxtalbot
Copy link

@kriskarkoski, this appears to be a duplicate, right? #52992

@msilbers
Copy link

msilbers commented Jul 3, 2021

@mrfoxtalbot I closed #52992 since this issue was opened first, but I do see there's a third one at #52743 also opened after. I'll leave these in your hands from here

@mrfoxtalbot
Copy link

Thank you @msilbers! Ideally, we will want to get back to our users letting them know the issue is solved. I am adding the full list of related issues here for reference:

#52743
#52992

Also, I am wondering if this might be related to #53595 @taggon, do you think there might be a connection between these two issues? Thank you!

@dcoleonline
Copy link
Contributor

I have another report where the customer expected for the embed to work on the live page, but it does not. It seems like the show inline embed feature only works in the editor but not for the live page. I've suggested the Embed block + the File block as a workaround for now.

#24043773-hc

@goblinartificer
Copy link

30262302-hc as well

@Robertght
Copy link

Another case in 4238984-zen

@Robertght Robertght changed the title File Block: PDFs are shown as embeds in the editor on Simple sites File Block: PDFs are shown as embeds only in the editor on Simple sites Aug 24, 2021
@rw-ye
Copy link

rw-ye commented Jan 12, 2022

Another report here: 4673233-zd-woothemes

@abcrsol
Copy link

abcrsol commented Jan 12, 2022

Another here: zd-4679947

@edwinho89
Copy link

4686073-zd-woothemes

@Jaccuse
Copy link

Jaccuse commented Jan 14, 2022

Another report: 33661080-hc

@Nic-Sevic
Copy link
Contributor

Nic-Sevic commented Jan 16, 2022

Just surfacing this as it seems like it might be related to how this bug is fixed:
Looks like in the 10.5 Jetpack there's this update
Security: PDF embeds now only display a link, to avoid issues with malicious PDFss that may run arbitrary code.

@syedshaon
Copy link

Another report: 4697471-hc

@cuemarie
Copy link

Looks like in the 10.5 Jetpack there's this update
Security: PDF embeds now only display a link, to avoid issues with malicious PDFss that may run arbitrary code.

@Nic-Sevic Thanks for sharing this!

For anyone here - does this mean that PDFs not displaying on live sites is now the intended design? I'm not sure if we're expecting a "solution" that allows PDFs to display again, or if this security change means that this features is going away.

@adelineyaw
Copy link

Another report: 4710700-zen

I've made a comment to this related p2: p3btAN-1Ab-p2#comment-15424

@dcoleonline
Copy link
Contributor

Reported in 32784736-hc

@csonnek
Copy link
Member

csonnek commented Jan 25, 2022

@happychait
Copy link

Another report in 33878839-hc

@darnelldibbles
Copy link

@rw-ye
Copy link

rw-ye commented Jan 31, 2022

Another report: 4734865-zd-woothemes

@druesome
Copy link
Contributor

Another report: 4732235-zd-woothemes

@daria2303
Copy link

4708055-zd-woothemes

@wpshellbelle
Copy link

Another report at 4678870-zen

@daria2303
Copy link

4742534-zd-woothemes would like to be informed when solved

@formosattic
Copy link

4760061-zd-woothemes

@annbingle
Copy link

Another report here 29586695-hc .

@formosattic
Copy link

formosattic commented Feb 9, 2022

As @metabreakr points out, this issue is discussed in p3btAN-1Ab-p2.

Updated initial post with workarounds to inline embed PDFs.

@mxhassani
Copy link

33485094-hc would want to be notified once fixed

@csonnek
Copy link
Member

csonnek commented Feb 28, 2022

User on the forums having this issue and would like to be notified when this is fixed: https://wordpress.com/forums/topic/problem-inserting-pdf-files/?view=all

Did not suggest a workaround as they found their own (uploading to Google Drive instead).

@1dr0
Copy link

1dr0 commented May 27, 2022

Closing as this seems to have been fixed as of now.

Tested on themes:

  • Non-FSE: Syntax, and Blask
  • FSE: Heiwa, and Russell

@1dr0 1dr0 closed this as completed May 27, 2022
@Jaccuse
Copy link

Jaccuse commented Jun 7, 2022

Might need reopening, @1dr0, I ran across what seems to be another case in 31616736-hc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug User Report This issue was created following a WordPress customer report
Projects
None yet
Development

No branches or pull requests