WordPress.org

Forums

WP Publication Archive
[resolved] Updated to 3.0 - can't view or download - goes to page (23 posts)

  1. kerryosborne
    Member
    Posted 1 year ago #

    After the update to 3.0, clicking on the title, the view, or the download link just takes me to the individual publication page. Moreover, the individual publication page is using a different template now and is not displaying correctly.

    The URL is http://www.st-stephens.org/wp/?page_id=361

    Would really appreciate help. I hate breaking the church website.

    http://wordpress.org/plugins/wp-publication-archive/

  2. kerryosborne
    Member
    Posted 1 year ago #

    It turned out that something in 3.0 was looping and exhausting the memory. The error message read: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 523800 bytes) in /users/st-stephens.org/htdocs/wp/wp-includes/plugin.php on line 104. Our host doubled our memory, and I got the same result. I downgraded to the previous version and got back in operation. ??? Hope this helps someone.

  3. a.estrada
    Member
    Posted 1 year ago #

    I had the same problem with version 3. the view option in the dashboard was taking me to an individual-strange looking page and the drop downs were having the save behavior, I have reverted the version and works now.
    I really like this plugin, I hope it gets fixed!

  4. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    @kerryosborne

    Not sure what's happening there. Can you provide more details regarding the WordPress and PHP versions on your server? Is there any chance I can get a copy of the error logs from when things broke?

    @a.estrada

    The dropdowns will no longer take you to the Publication landing page but will immediately open the publication instead as of version 3.0.1.

    The "individual-strange looking page" is a Publication landing page. Since I can't predict what theme you have running on your system, the default landing page template is based on WordPress' default theme (Twenty Twelve).

    You can replace the template by dropping a single-publication.php file in your theme root and styling it however you want. Take a look at the default template in /wp-publication-archive/includes/single-publication.php to see how the different Publication fields are being retrieved and used by PHP.

  5. World Conference of Associations of Theological Institutions
    Member
    Posted 1 year ago #

    Eric,

    I just upgraded to the 3.0.1 version of your plugin and only one of my view and download links works for the 96 items in the archive.
    whenever anyone clicks a download or view link all it does is take them to a publication landing page.

    what should I do? downgrade?

    if it helps my site is wocati.org

  6. World Conference of Associations of Theological Institutions
    Member
    Posted 1 year ago #

    reverted to the old plugin and it works fine.

  7. gurra
    Member
    Posted 1 year ago #

    Hope this might be a clue to cause of the problem. (I have got the same problem since version 3 – 3.0.1, not being able to download.)

    I checked the pages html source code – the download and view links from two different installations. One using the old plugin (version 2.5.7.2) and on using the latest (3.0.1) and found the following differences:

    Source code from the old plugin page:
    &wppa_open=1">Open</a>
    &wppa_download=1">Download</a>

    Source code from the new plug-in page:
    &view=yes">View</a>
    &download=yes">Download</a>

    As you see the “wppa” are missing in the download/view links in the source code on the page using the latest plug-in version. May this be a cause to the problem?

  8. gurra
    Member
    Posted 1 year ago #

    Eric,

    I add this information as well. The first one you asked for above:
    PHP version on server: 5.3
    MySQL: 5.1
    WordPress: 3.6
    Other Plugins activated:
    - Role Scoper 1.3.61
    - Theme My Login 6.3.8

    Would be very happy if this information could help you or anyone else to find the cause of the problem. I really appreciate the plugin and rather not want to use an old version if not necessary.

  9. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    Do you have pretty permalinks enabled, or are you using the default ?p=234 format?

  10. gurra
    Member
    Posted 1 year ago #

    I am using the default ?p=234 format.

  11. gurra
    Member
    Posted 1 year ago #

    But the absolute url of the file is used when uploaded and published (in the publication post form). This is also the settings I have used earlier, all the time.

  12. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    The point of the plugin is to make it so your end users don't download the file directly from the absolute URL. The file is read from the absolute URL directly and is passed directly through the browser to the end user.

    Whether you use the standard link structure (?p=123) or a pretty permalink structure, the behavior inside the plugin is the same. But there is a bug with the standard link structure at the moment.

  13. gurra
    Member
    Posted 1 year ago #

    Ok, and thanks for your answer! If I interpret your answer correctly I should enable pretty permalinks instead? I will try this.

  14. gurra
    Member
    Posted 1 year ago #

    Eric,

    Thanks a lot again. I changed to pretty permalinks and now it works.

  15. mohamedsaaditjari
    Member
    Posted 1 year ago #

    i'm using WP Publication Archive 3.0.1
    theme name: Tisson
    in Permalinks i selected web URLs to be "Post name" instead of "Default"

    The Web Site

    Issue: after clicking on "Download", the downloaded file is broken (0 kb
    also the same thing with "view" option, the paged opened empty

    keep in mind that the files are uploaded correctly and saved on the server and when typing its absolute URL which in the publication form in the backend, the files showed correctly in the browser

    the files type is PDF
    so what is wrong?
    Thanks for you help

  16. dilasso
    Member
    Posted 1 year ago #

    Hi,

    i do have the same issue with 3.0.1
    When i use standard permalinks it takes me to the publication page.

    I have changed from standard permalinks to pretty permalinks, and then i get a 404.
    I see that some of the websites posted before already solved the problem. did everybody just downgrade to a previous version?

    It's hard to believe this is the only solution?

    my site: http://tiefenoekologie.at/?page_id=511

    or http://tiefenoekologie.at/ressourcen

    i appreciate your help.
    Roland

  17. dilasso
    Member
    Posted 1 year ago #

    OK, there is one more thing I found out:
    I have my wordpress installation in a subdirectory (i.e. tiefenoekologie.at/wp), but use it on the main domain (i.e. tiefenoekologie.at).

    Both "view" and "download" link to the subdirectory.
    If I just delete the subdirectory (i.e. /wp/) inside the link i can download or get to a view page. Anyway the document cannot be viewed.

    example:
    tiefenoekologie.at/publication/view/interview-mit-andreas-schelakovsky-im-magazin-wienerin

    I use wp publication archive 3.0.1
    Hope there is help.

    Roland

  18. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    That helps immensely, actually. From the looks of the PDF file served, the copy on the server might be corrupt. As for the URL issue, though, this gives me some information with which I can fix the issue.

  19. dilasso
    Member
    Posted 1 year ago #

    Thanx Eric for the answer.

    I double checked the files on the server. They are all correct displaying if i direct to the real location on the server. So the files are OK.

    Roland

  20. dilasso
    Member
    Posted 1 year ago #

    Hi Eric,

    I still have no solution for my problem. Also the plugin hasn't been updated since. Are you still workin on this issue? Will there be an update of the plugin in the next time?

    Thanx for an answer

    Roland

  21. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    I can't work on a problem that I can't diagnose. While you might be able to see the files when you route to them directly, I cannot see them on the links you've given me. Instead, Chrome presents a "Failed to load PDF document" error.

    I pulled up the same URL in a web proxy tool to inspect the actual data you're sending across. Your server is delivering a PDF, but the file itself is corrupt.

    Inspecting the file directly, I can see it's a PDF 1.4 document and I can see the file stream.

    The download link for the file does work, though: http://tiefenoekologie.at/publication/download/interview-mit-andreas-schelakovsky-im-magazin-wienerin/

    This tells me something is going wrong in how your server is streaming to the browser for viewing.

    Both the view and download methods use PHP's readfile() function to stream the file contents to the browser. Since the download method is working but the view method isn't, I looked at the actual output of both.

    Both are streaming the entire file. The view method, however, is automatically appending some additional hex content to the end of the file for which I cannot account - since the plugin merely reads the file then calls exit(), this means something on your server is appending the content.

    There isn't a fix in the plugin I can provide.

    However, if you add the following code to your theme's functions.php file, the plugin will skip the streaming entirely and merely redirect visitors the the file itself (since the file is working on your server, this is the best solution):

    add_filter( 'wppa_mask_url', '__return_false' );

  22. dilasso
    Member
    Posted 1 year ago #

    Hi Eric,

    Thanx for your reply.

    Adding this code to my functions.php file killed the site completely. Is there something missing in the code?

  23. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    Without seeing your theme (the code itself) I can't say why that would have broken the site. But what I can tell you is this:

    __return_false is a core WordPress function since version 3.0 and is available for filters: http://codex.wordpress.org/Function_Reference/_return_false

    wppa_mask_url is the name of the filter used in /lib/class.wp-publication-archive.php's function open_file(). The plugin checks the return of this filter: if true, it attempts to mask the file by streaming things (which is the current issue on your site - the file is being streamed with extra data appended to the end of it). If the filter returns false, then it skips the masking routine and instead sends a 303 See Other header and redirects the browser directly to the file path on the server.

    Merely adding a filter like this will not break a site, since it won't even be applied until the open_file() routine is used.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Publication Archive
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic