PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Entry Details - Incorrect link/path to image

  1. I am using the following code in my functions.php to update the upload path of images submitted via my form:

    /* This function needs the correct form id and server path */
    add_filter("gform_upload_path_1", "change_upload_path");
            function change_upload_path($path_info){
                $path_info["path"] = "/mnt/stor1-wc2-dfw1/467468/658308/www.mydomain.com/web/content/wp-content/gallery/photos-page/";
                $path_info["url"] = "http://www.mydomain.com/wp-content/gallery/photos-page/";
                return $path_info;
            }

    This is working perfectly. The problem I am having is when I am viewing any of the entry details
    (admin.php?page=gf_entries&view=entry&id=1&lid=49&paged=1)

    The link for the uploaded image is incorrect. When I click on the image title which is supposed to link to the uploaded image it links to http://www.mydomain.com/image.jpg

    I need the link to be http://www.mydomain.com/wp-content/gallery/photos-page/image.jpg

    Does this make sense? I've tried browsing the entry_detail.php file to find the correct href to update but can't seem to locate it. Can anyone advise me on how to accomplish this?

    Posted 12 years ago on Tuesday March 6, 2012 | Permalink
  2. Hi, derekshirk,

    When you directly load the link for the URL (not in the admin) using the path it is supposed to be, does the image display? The code looks correct, but I am wondering if maybe you need to reference the URL differently, in case there are virtual paths and the root URL is really something like http://www.mydomain.com/gallery/photos-page/image.jpg .

    Posted 12 years ago on Wednesday March 14, 2012 | Permalink

This topic has been resolved and has been closed to new replies.