Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Viewing PDF's crashes browser-tab

I have an upgraded database with lots of posts created in 1.4 (now running 1.7.5), when trying to view a preview of an old PDF-file the browser-tab crashes, in both Pawtucket and Providence.
But if I download the original from the server an re-upload it as a new representation it previews fine.

So is there any way to re-create the previews for already uploaded files so I don't have to manually upload them all again?

Comments

  • Hi torbjorn,

    You can run the reprocess-media tool to regenerate your preview files.  Run bin/caUtils help for more information (in the support folder of your providence installation)
  • edited February 2018
    Ok I tried that with a specific post I know I have problems with and got this result:
    sudo bin/caUtils reprocess-media -i 46942

    CollectiveAccess 1.7.5 (146/GIT) Utilities

    (c) 2013-2015 Whirl-i-Gig

    Re-processing Ägarelängd över Näsby Gård.pdf (46942) 100.0% 1/1 ETC: < 1 sec. Elapsed: < 1 sec [===============================]

    Error processing representation media: Identifier already exists and duplicates are not permitted

    And I didn't see any option with the tool to create new identifiers so I am confused as how to do that automatically for all posts I need to reprocess.
  • Hi,

    In your app.conf file (in the app/conf directory) make sure these two directives are set to a non-zero value (1 is a good candidate!):

    allow_duplicate_id_number_for_ca_object_representations = 1
    allow_duplicate_labels_for_ca_object_representations = 1

    Then try running it again.
  • I did those changes to the config and then re-ran the re-processes and it seemed to work, didn't get any errors.

    When viewing the object in Providence it seems to work.
    But in Pawtucket the mediaviewer never finishes loading the preview or display it.
    The browser doesn't crash though so thats good.
    I tried uploading the original as a alternate representation and that one is previews correctly in Pawtucket but I can also see a thumbnail of both documents beneath.
    (Including a picture of what I'm talking about)

    Does Pawtucket have some kind of cache for these kinds of things? Since it works in Providence.

    image

  • Yes, it does have a tile cache. Try removing the contents of the app/tmp directory. Does that makes any difference?
  • Ran an sudo rm app/tmp/* -R in Pawtucket but it didn't change anything.
    Should I empty out Providences tmp folder too?
  • No, that's not relevant for Pawtucket.  Are there any errors in the javascript console when you load the viewer?
  • openseadragon.js:16380 Assertion failed: [Viewport.setHomeBounds] bounds.height must be greater than 0

    This seems to pop-up when the document is not loaded. So something points to the viewer expecting to download a document to preview but not getting anything so the hight is nothing I suppose?
    I don't get any form of 400 or 500 error though, atleast not in console.

    Checking the network tab I can't seem to find where the actuall preview data is being downloaded so I am not sure where to check if the file it needs exists.
  • I had the same problem on a server, I found that the fault is inside dimensions sent back as text strings instead of float/int (getMediaInfo)
    You can compare within Chrome Inspector your info.json to this example :
    You may see quotes around your dimensions : width and height values.

    You may try this patch file on your installation : https://gist.github.com/gautiermichelin/4985c4f5978b95e6ac18fe0e569ea94e for app/lib/ca/Service/IIIFService.php
  • Hi Gautier

    Thank you very much for your patch, this seems to partially solve the pawtucket viewers problem not showing images (except for Tileviewer) discussed here:


    I still have somewhat long loading times for large images, but mirador and UniversalViewer are working now.

    Could this patch be merged in the main branch?
    Thx
    Olivier
  • I tried to patch with gautier's update but I'm still getting the same
    openseadragon.js: Assertion failed: [Viewport.setHomeBounds] bounds.height must be greater than 0  in pawtucket
  • edited June 2018
    Hi gautier!

    Somehow our Providence installation doesn’t show any pictures in media overlay no matter which viewer I choose. Using UniversalViewer I get the follwing error in Chromes Console View when opening an image: 


    I used your patched IIIFService but my info.json starts with a blank line which apparently seems to be the culprit: https://forum.omeka.org/t/universal-viewer-not-displaying-images/3529/8

    I checked folder permissions, cleared all tmp and cache files and in pawtucket2 the images are loading fine via TileViewer. What am I missing? Thanks for your help!
  • My bad, I tinkered with /app/helpers/displayHelpers.php a while ago and somehow added a new line somewhere in between. Changed back to the original one and everything is working fine again. 

    Also @gautier: Thanks for your IIIFService.php – now we can use Mirador both in Pawtucket and Providence!
  • Hi Gautier.

    Thank you so much for your patch, I was able to get this to work for my installation as well.

  • I’m working with a new system, also 1.7.6 master branch, with lots of Images which have been uploaded in the past years (System run a long time on 1.3 if I’m not mistaken).

    • I changed the media viewer to Mirardor for media_overlay in media_display.conf
    • used Gautiers fixed IIIFService.php (actually I tried to use all IIIFServices I could find on Githubs Master and Dev Branches) but the Pictures won’t show up if I click on them.
    • Thumbnails are generated correctly, though.
    • I tried caUtils reprocess-media for selected Images, no luck either.
    • I set chown to apache:apache for the media directory (was root:root)
    • UniversalViewer and TileViewer don’t work as well.

    What else should/could I try to get images to load?

    Thanks!

  • Okay, I somehow managed to get Mirador working in both Systems but only with newly uploaded Images and some old ones… I can’t figure out which old images work and reprocessing the media doesn’t change anything. Has anyone had such a problem? Do I have to remove and upload all media again?

  • Gautier, I am having some issues with your mod, which actually works in pawtucket, but to see the image in Mirador, I have to open it two times (i.e. the first click shows a black Mirador screen, the next opens succesfully the image).

    Any hint?

    Thank you

    Giovanni

Sign In or Register to comment.