WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP Download Codes file link not working (14 posts)

  1. seanpatrick
    Member
    Posted 4 years ago #

    I've installed WP Download Codes on a WP 2.8.4 site. Everything works great, up to the point when the user inputs their code. The file link is displayed, but when clicked the user is redirected to enter a code and no file starts to download. I even tried to do a "Save Link As" but that didn't work either.

    Any ideas? Thanks!

    http://wordpress.org/extend/plugins/wp-download-codes/

  2. misanthrop
    Member
    Posted 4 years ago #

    Thank you. I don't know if the next version 1.0.7, which I just checked in, fixes your problem, but there is a problem with the determination of the upload path/directory in WP. I corrected this, but if it does not help you, please ask me again.

  3. seanpatrick
    Member
    Posted 4 years ago #

    In looking at the code, I'm getting an empty link tag:

    <a href="">

    I updated to 1.0.7 and still seem to have the problem. Any ideas what could be causing this?

    I'm not sure if it's related, but some of the images on my sidebar being pulled as posts don't seem to appear on the download page either.

    Thanks for the prompt reply!

  4. misanthrop
    Member
    Posted 4 years ago #

    Seems to be something with the PHP memory limit. I will try to improve my programming, but meanwhile, you could try to increase the according parameter in PHP (if possible).

  5. misanthrop
    Member
    Posted 4 years ago #

    Actually, the problem results from side effects with other WP plugins. The sending of headers maybe lead to collisions, but without being able to reproduce the problem, I am a bit helpless.

    Nevertheless, I tried to fix the problem by temporary redirection of the download file page, and I hope this is the final solution to the problem.

    Please tell me, if it works in version 1.0.8.

  6. seanpatrick
    Member
    Posted 4 years ago #

    That seems to be the right direction, but needs a small fix... Once clicking the link, it goes to a page not found error:

    "Not Found

    The requested URL /wp-content/plugins/wp-download-codes/dc_download.php was not found on this server."

    That URL doesn't include the directory where my WordPress installation is: /site/wp-content/...

    Could that be the problem?

    I really appreciate you working on this. I was also hoping for the shortcode without ID, but didn't want to get greedy... thanks!

  7. seanpatrick
    Member
    Posted 4 years ago #

    Actually, it broke my whole site! Now, every page on WordPress loads that Page Not Found error! Yikes!

  8. misanthrop
    Member
    Posted 4 years ago #

    Stay calm. It might just be a caching problem. Close the browser and restart it.

    The redirection did not work as you did not install wordpress in the root. I tried to circumvent it in version 1.0.8.1 using get_bloginfo('url'), and this should help.

    Hope, it works now.

  9. seanpatrick
    Member
    Posted 4 years ago #

    I fixed it. In dc_template.php, I changed:

    // Redirect to download page
    wp_redirect( '/wp-content/plugins/wp-download-codes/dc_download.php' );

    to:

    // Redirect to download page
    wp_redirect( '/site/wp-content/plugins/wp-download-codes/dc_download.php' );

    around line 129. /site/ is my WordPress directory (as opposed to /wordpress/).

    Works perfectly now!

  10. noizeburger
    Member
    Posted 4 years ago #

    Thanks Armin, you're the man. Now it works for me.

    greetz,
    noizeburger

  11. jenai
    Member
    Posted 4 years ago #

    Hi, just to quickly add to this. Is there any way to use an external link? I have a separate downloads server and would love to use that!

  12. finnn
    Member
    Posted 4 years ago #

    Hello,

    I have the same error (blank href) but I'm not sure what exactly should replace "site". The full webaddress or the full path on the Server?
    Also I have a custom Permalink Option: "/index.php/%category%/%postname%/". Perhaps this makes the trouble with the empty links which the plugin produces :( If anyone could help.. that would be great, If Infos are missing just write.

    finnn

  13. romanczar
    Member
    Posted 3 years ago #

    HI,

    it seems like the plugin only works on POSTS, not PAGES. Anyone has an idea on how to solve that?

    THX

  14. lowercase001
    Member
    Posted 3 years ago #

    I am now getting the blank link/href problem too that may others are. Everything works fine but for the link not pointing to the file!

    The link, however works fine in INternet Explorer, Safari, Google Chrome. It does NOT work in Firefox.

    Any idea why it works in everything but firefox??

    Any help appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic