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.

Files not being added to Gallery

  1. sccr410
    Member

    http://www.911parrotalert.com

    We have a form that let's users create content on our site. The form adds to a custom post type via:

    add_filter("gform_post_data", "update_post_type", 10, 2);
    function update_post_type($post_data, $form){
    
        if($form["id"] == '7'){
            $post_data["post_type"] = "found-birds";
        } else if($form["id"] == '5'){
            $post_data["post_type"] = "lost-birds";
        }
        return $post_data;
    }

    When users upload a photo, it does not get attached to the post. It isn't even added to the uploads folder (organized by month/date).

    This just suddenly stopped working, probably after a recent update (site owners do plugin updates so not sure if this is true). We had this form working for a long time without issue.

    Posted 11 years ago on Wednesday September 12, 2012 | Permalink
  2. If you send a WordPress administrator login to chris@rocketgenius.com , I will take a look at this for you. Thank you

    Posted 11 years ago on Friday September 14, 2012 | Permalink
  3. sccr410
    Member

    Should have received an email with the admin login info

    Posted 11 years ago on Friday September 14, 2012 | Permalink
  4. I did receive that. I will take a look at this for you this weekend.

    Posted 11 years ago on Friday September 14, 2012 | Permalink
  5. It appears you used the file upload field type rather than the Image field. I duplicated your forms and then added an image upload field. The image was uploaded, stored with the entry and appeared in the post.

    I removed my duplicate forms, reversed my changes which were made to your theme's functions.php, but left the test post where the image was inserted properly into the post. You will find it here: ?post_type=lost-birds&p=34522&preview=true

    I think if you change the file upload field to an image upload field it will work for you. I am unsure of why it was working before with the file upload field.

    Posted 11 years ago on Sunday September 16, 2012 | Permalink
  6. sccr410
    Member

    Thanks. Client may have messed with the forms not realizing what they were doing.

    Posted 11 years ago on Wednesday September 19, 2012 | Permalink
  7. OK, please let us know if you need any more help.

    Posted 11 years ago on Wednesday September 19, 2012 | Permalink