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

Some shortcode parameters are not working for some documents #52

Open
jaredcobb opened this issue Jun 12, 2017 · 1 comment
Open

Some shortcode parameters are not working for some documents #52

jaredcobb opened this issue Jun 12, 2017 · 1 comment

Comments

@jaredcobb
Copy link

It seems that some of the shortcode parameters (for example height, width, zoom, page, and a few others) are not consistently working on some documents.

Steps to reproduce:

  1. Add the following shortcode to a post:
[documentcloud url="https://www.documentcloud.org/documents/2746909-ABCC-List.html" responsive="false" width="400" height="400" page="3" zoom="false" /]
  1. The plugin will make an API call like so:
https://www.documentcloud.org/api/oembed.json?maxwidth=400&maxheight=400&url=https://www.documentcloud.org/documents/2746909-ABCC-List.html?page=3&zoom=false&responsive=false
  1. The API response will be:
{
    "type": "rich",
    "version": "1.0",
    "provider_name": "DocumentCloud",
    "provider_url": "https://www.documentcloud.org",
    "cache_age": 300,
    "height": 400,
    "width": 400,
    "html": "<div class=\"DC-embed DC-embed-document DV-container\"> <div style=\"position:relative;padding-bottom:141.2857142857142%;height:0;overflow:hidden;max-width:100%;\"> <iframe src=\"//www.documentcloud.org/documents/2746909-ABCC-List.html?embed=true&amp;notes=false&amp;page=3&amp;pdf=false&amp;responsive=false&amp;search=false&amp;sidebar=false&amp;text=false&amp;zoom=false\" title=\"ABCC-List (Hosted by DocumentCloud)\" sandbox=\"allow-scripts allow-same-origin allow-popups\" frameborder=\"0\" style=\"position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #aaa;border-bottom:0;box-sizing:border-box;\"></iframe> </div> </div>"
}
  1. Note a few things about the html value...
  • The inline style attribute is set at 100% width and 100% height (even though the JSON response shows 400 x 400.
  • The iframe src value properly renders zoom=false however the Zoom slider control will still show up.
  • The iframe src value properly renders page=3 however the document will not default to Page 3.
@montchr
Copy link

montchr commented Aug 21, 2018

Confirmed this is happening for me too on a fresh WP install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants