Support

Account

Home Forums Front-end Issues Front End Form – Gallery Bug

Solved

Front End Form – Gallery Bug

    • luglio7

    • August 20, 2013 at 6:26 pm

    I set up a front end form and it work 95% flawlessly. The only problem i get is when i click on the “add image” button of the galery field i get this Js error:

    Uncaught TypeError: Object #<error> has no method ‘value’

    (media-models.min.js)

    • luglio7

    • August 20, 2013 at 8:13 pm

    This is the code of my page.

    <?php
    acf_form_head(); 
    
    if( !is_user_logged_in() ){
        header("Location:" . home_url());
    }
    
    $post_id = NULL;
    if( !empty($_POST['recipe_id']) and is_numeric($_POST['recipe_id']) ){
        $post_id = $_POST['recipe_id'];
    }
    
    $acf_options = array(
        'field_groups'  => array(5),
        'return'        => get_permalink(),
        'submit_value'  => __('Inoltra', 'ricette')
    );
    
    if( $post_id ){
        $acf_options['post_id'] = $post_id;
    }
    ?>
    <?php get_header(); ?>
    <div id="edit-recipe" class="content">
        <?php  
        acf_form($acf_options);
        ?>
    </div>
    <?php get_footer(); ?>
    • luglio7

    • August 20, 2013 at 8:15 pm

    Also: it is not clear if i can create a new post or edit only is allowed. Sorry for multiple posting

    • Elliot

    • August 21, 2013 at 2:20 pm

    Hi @mountainthemes

    There are tutorials showing how to create a new post however, it looks like your code above is for editing only.

    Can you clarify exactly which button is causing the issue? Is it the one inside the popup? Or is it the actual gallery field button?

    • luglio7

    • August 21, 2013 at 6:55 pm

    the blue button 🙂

    http://d.pr/i/2iCJ

    • Elliot

    • August 22, 2013 at 12:42 pm

    Hi @mountainthemes

    Is it possible to get a URL to see this JS error for myself, I may be able to spot the issue.

    Thanks
    E

    • luglio7

    • August 22, 2013 at 7:51 pm
    This reply has been marked as private.
    • Elliot

    • August 23, 2013 at 2:14 pm

    Hi @mountainthemes
    Can I ask what version of the gallery field add-on are you using?

    Can you update it?

    • luglio7

    • August 26, 2013 at 6:24 pm

    Gallery : 1.1.0
    Acf : 4.2.2

    • luglio7

    • August 26, 2013 at 6:48 pm
    This reply has been marked as private.
    • Elliot

    • August 27, 2013 at 2:16 pm

    Hi @mountainthemes

    With such a highly customized website, I’m not sure I am able to help you on this issue.

    On a blank install, I can confirm that the gallery field will work, are you able to test this yourself on a fresh install?

    • luglio7

    • August 27, 2013 at 6:18 pm

    I will test it today or tomorrow on a blank website. I hope to find the way.

    • luglio7

    • August 28, 2013 at 7:46 pm

    Solved
    It was the “lodash” js library.
    Basically the problem was the js enqueue set of scripts.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.