Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am actually using 7.x-2.x from October 30, 2013. I have added a File field as Media file selector for my Issuu. The allowed type is Document and URI scheme is issuu.
The display is Rendered file and view mode is Original. Under admin/structure/file-types/manage/document/file-display
, I expected to see "Issuu document" or something as a display.
I am using Media 7.x-2.0-alpha3. Any help would be appreciated!
Comment | File | Size | Author |
---|---|---|---|
#6 | media_issuu_redirect.patch | 1.32 KB | michaelk |
Comments
Comment #1
MrPeanut CreditAttribution: MrPeanut commentedI updated every module (Drupal core and Media) and am now able to get the documents to load. However, they don't seem to be using the values I thought I set.
For example, on Manage Display for my content type, I have chosen Rendered file and Original for the View mode.
On
admin/structure/file-types/manage/document/file-display/media_original
, I set Original to load Issuu Document and set my dimensions. However, the node does not use those dimensions.For what it's worth, I set Link to Issuu Preview Image and it does seem to work. In my case, it loads my thumbnail_135px image style.
Comment #2
mallezieThis needs more work in the theme file
I'll hope te get some results in the coming weeks, since i need this fix myself.
Comment #3
mallezieComment #4
michaelk CreditAttribution: michaelk commentedI am also running into this issue on a site that was already working well several months ago. The issue appears to be that drupal_http_request no longer returns a redirect_url field for some reason. Here are the error message I am seeing in my site logs:
Notice: Undefined property: stdClass::$redirect_url in media_issuu_preprocess_media_issuu_document() (line 24 of /sites/all/modules/contrib/issuu/media_issuu/includes/themes/media_issuu.theme.inc).
Notice: Undefined index: query in media_issuu_preprocess_media_issuu_document() (line 26 of /sites/all/modules/contrib/issuu/media_issuu/includes/themes/media_issuu.theme.inc).
Notice: Undefined index: e in media_issuu_preprocess_media_issuu_document() (line 27 of /sites/all/modules/contrib/issuu/media_issuu/includes/themes/media_issuu.theme.inc).
Comment #5
michaelk CreditAttribution: michaelk commentedComment #6
michaelk CreditAttribution: michaelk commentedHere is a patch that solves the issue by changing the method used to determine the Issuu document id from the uri. Give it a try and see if it solves the issue for you as well.
Comment #7
michaelk CreditAttribution: michaelk commentedComment #8
mallezieI pushed a fix for the problem. It seems indeed something fixed from the issuu side.
I implemented another fix, to get away from the config ID search. I found out you can embed issues now with the url, which simplifies the code.
Commit can be seen in http://cgit.drupalcode.org/issuu/commit/?id=4ef9af2
(Never mind the wrong issuu number in the commit, my bad)
Thanks for the help!
Leaving this issue open to look further in the attributes problem described in the OP.
Comment #9
AdmiralSenn CreditAttribution: AdmiralSenn commentedI have a strange issue that may be related to this. I have already applied the patch from this thread.
On my site, ISSUU documents appear to load and display correctly for several days, sometimes as long as a week, then the document fails to display. It will display a link to the ISSUU document, but the embedded viewer is missing. The source for the page does not show the iframe at all.
The page in question was displaying through a View using 'rendered content'. I have switched the view to use Fields, but in doing so noticed that the error appears exactly as if the ISSUU field is set to 'generic file' instead of 'rendered content'.
I have been unable to get any more information as the problem appears to disappear after caches are cleared, and so far I have not caught it when I'm at a workstation to inspect further. I have gotten screenshots from a few people on the site that show the same problem so it does seem to be an issue with the site vs. a browser or OS problem.
I will update if the issue happens using fields instead of rendered content.
Comment #10
AdmiralSenn CreditAttribution: AdmiralSenn commentedAddendum to previous post, using Fields does not seem to make a difference.
Also, the module seems to be picky about the URL used to refer to an ISSUU document.
If you use the 'share' link from your issuu document (e.g. http://issuu.com/youraccount/docs/pdf_name_here_issuu_randomidentifierst...
vs
http://issuu.com/youraccount/docs/pdf_name_here_issuu
the first one works occasionally but the second one seems to work more reliably. Perhaps the module should check for and strip that section of the URL? Or maybe there's something else going on.
Is there any chance that someone can write an updated how-to for this so I can make sure I'm not being stupid and doing this wrong?
Comment #11
liquidcms CreditAttribution: liquidcms commentedDoes anyone know if this works? Or maybe it used to but doesn't anymore?
I used field type: file, i know it scrapes something because when i add the Issuu url since it pulls the title for "Name". I am not sure what the proper formatter is but i don't seem to have anything like "Issuu" as a formatter so i use Rendered File. The output is simply a generic file icon with the title Issuu document title, linked to site home page.
Comment #12
Ludo.R@liquidcms: I have the same issue, no issuu-specific formatter is available to display the field.
Did you find a solution?