• Resolved alexandraka

    (@alexandraka)


    Hello,

    this might be probably something stupid, but I cannot upload picture when using the form to add an ad.

    When clicking on the button to upload picture, it drives me (I’m root) to the top of the page (and that’s all)

    I extracted the html code of the button

    <div id="adverts-plupload-upload-ui-gallery" class="adverts-plupload-upload-ui adverts-browser-frontend">
            <div id="adverts-drag-drop-area-gallery"class="adverts-drag-drop-area">
            
            </div>
            <div class="adverts-gallery">
                <p>Déposer les fichiers ici pour les ajouter</p>
                <p><a href="#" id="adverts-plupload-browse-button-gallery" class="adverts-plupload-browse-button adverts-button">Ajouter des images…</a></p>
            </div>
            <div class="adverts-gallery-uploads">
    
            </div>
    
        </div>

    indeed, the button link shows href=”#”
    is it normal ?

    cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    yes, the link should be “#” only, as for the problem itself, it looks like there is some kind of JavaScript error on the page that prevents the plugin from working properly.

    Is it possible for you to paste here a link to your page with the [adverts_add] shortcode i would take a look at it on-site and should be able to help you with the error then.

    Thread Starter alexandraka

    (@alexandraka)

    As the website is on registration only, I can only give you an access via an guest account, please send me a mesg in order that I forward you the credentials
    root @ asmtplongee.org

    or I can copy the <form>

    <form action="" method="post" class="adverts-form adverts-form-aligned">
        <fieldset>
            
                    <input type="hidden" name="_post_id" id="_post_id"  />                <input type="hidden" name="_adverts_action" id="_adverts_action" value="preview"  />                <input type="hidden" name="_wpadverts_checksum" id="_wpadverts_checksum" value="311e8cb2b9d22583d01267e5766d25b8"  />                <input type="hidden" name="_wpadverts_checksum_nonce" id="_wpadverts_checksum_nonce" value="ab1ce6d510"  />                <input type="hidden" name="_post_id_nonce" id="_post_id_nonce"  />                <input type="hidden" name="_timetrap_field" id="_timetrap_field" value="VVJwWllMeStOK1E3emxKeGRRMDJEUT09"  />                
                    
            <div class="adverts-control-group adverts-field-header adverts-field-name-_contact_information ">
                
                            <div class="adverts-field-header">
                    <span class="adverts-field-header-title">Information de contact</span>
                                </div>
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-account adverts-field-name-_adverts_account ">
                
                            
                <label for="_adverts_account">
                    Compte                            </label>
                
                <div>Vous êtes en train de naviguer en tant que <strong>root</strong>. <br/>Si vous voulez utiliser un autre compte, s'il vous plaît <a href="https://asmtplongee.org/wp-login.php?action=logout&_wpnonce=0ed292b848">déconnectez vous</a>.</div>
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-text adverts-field-name-adverts_person ">
                
                            
                <label for="adverts_person">
                    Personne de contact                                <span class="adverts-form-required">*</span>
                                </label>
                
                <input type="text" name="adverts_person" id="adverts_person" value="root"  />
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-text adverts-field-name-adverts_email ">
                
                            
                <label for="adverts_email">
                    E mail                                <span class="adverts-form-required">*</span>
                                </label>
                
                <input type="text" name="adverts_email" id="adverts_email" value="root@asmtplongee.org"  />
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-text adverts-field-name-adverts_phone ">
                
                            
                <label for="adverts_phone">
                    N° de téléphone                            </label>
                
                <input type="text" name="adverts_phone" id="adverts_phone"  />
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-header adverts-field-name-_item_information ">
                
                            <div class="adverts-field-header">
                    <span class="adverts-field-header-title">Texte d'information</span>
                                </div>
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-text adverts-field-name-post_title ">
                
                            
                <label for="post_title">
                    Titre                                <span class="adverts-form-required">*</span>
                                </label>
                
                <input type="text" name="post_title" id="post_title"  />
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-select adverts-field-name-advert_category ">
                
                            
                <label for="advert_category">
                    Catégorie                            </label>
                
                <select id="advert_category" name="advert_category[]" class=" adverts-multiselect adverts-max-choices[10]" multiple="multiple" ><option value="59" >Bouteilles</option><option value="60" >Détendeurs</option><option value="62" >Divers (Parachute, lampe…)</option><option value="63" >Ordinateurs, Sondes, Profondimètres, Tables…</option><option value="58" >PMT (Palmes Mask Tuba)</option><option value="61" >Stab / Wings</option></select>
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-gallery adverts-field-name-gallery ">
                
                            
                <label for="gallery">
                    Galerie                            </label>
                
                
    
        <div id="adverts-plupload-upload-ui-gallery" class="adverts-plupload-upload-ui adverts-browser-frontend">
            <div id="adverts-drag-drop-area-gallery"class="adverts-drag-drop-area">
            
            </div>
            <div class="adverts-gallery">
                <p>Déposer les fichiers ici pour les ajouter</p>
                <p><a href="#" id="adverts-plupload-browse-button-gallery" class="adverts-plupload-browse-button adverts-button">Ajouter des images…</a></p>
            </div>
            <div class="adverts-gallery-uploads">
    
            </div>
    
        </div>
        
                
            
        
        <script type="text/javascript">
        if(typeof ADVERTS_PLUPLOAD_DATA === "undefined") {
            var ADVERTS_PLUPLOAD_DATA = [];
        }
        ADVERTS_PLUPLOAD_DATA.push({"init":{"runtimes":"html5,silverlight,flash,html4","browse_button":"adverts-plupload-browse-button-gallery","container":"adverts-plupload-upload-ui-gallery","drop_element":"adverts-drag-drop-area-gallery","file_data_name":"async-upload","multiple_queues":true,"max_file_size":"0","url":"https:\/\/asmtplongee.org\/wp-admin\/admin-ajax.php","flash_swf_url":"https:\/\/asmtplongee.org\/wp-includes\/js\/plupload\/plupload.flash.swf","silverlight_xap_url":"https:\/\/asmtplongee.org\/wp-includes\/js\/plupload\/plupload.silverlight.xap","filters":[{"title":"Fichiers autoris\u00e9s","extensions":"*"}],"multipart":true,"urlstream_upload":true,"multipart_params":{"_wpadverts_checksum_nonce":"ab1ce6d510","_wpadverts_checksum":"311e8cb2b9d22583d01267e5766d25b8","action":"adverts_gallery_upload","form":"advert","field_name":"gallery"}},"data":[],"conf":{"button_class":"adverts-button","input_post_id":"#_post_id","input_post_id_nonce":"#_post_id_nonce","_wpadverts_checksum_nonce":"ab1ce6d510","_wpadverts_checksum":"311e8cb2b9d22583d01267e5766d25b8","_post_id":null,"_post_id_nonce":null,"field_name":"gallery","form_name":"advert","save":{"method":"media-library","supports":["featured"]},"uniqid":null},"sizes":{"adverts_gallery":{"enabled":"1","width":"650","height":"300","crop":0},"adverts_list":{"enabled":"1","width":"310","height":"190","crop":"1"},"adverts_upload_thumbnail":{"enabled":"1","width":"150","height":"105","crop":"1"}}});
        
        if(typeof ADVERTS_IMAGE_SIZES === "undefined") {
            var ADVERTS_IMAGE_SIZES = {"adverts_gallery":{"enabled":"1","width":"650","height":"300","crop":0},"adverts_list":{"enabled":"1","width":"310","height":"190","crop":"1"},"adverts_upload_thumbnail":{"enabled":"1","width":"150","height":"105","crop":"1"}};
        }
        </script>
        
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-textarea adverts-field-name-post_content ">
                
                            
                <label for="post_content">
                    Description                                 <span class="adverts-form-required">*</span>
                                </label>
                
                <div id="wp-post_content-wrap" class="wp-core-ui wp-editor-wrap tmce-active"><link rel='stylesheet' id='editor-buttons-css'  href='https://asmtplongee.org/wp-includes/css/editor.min.css?ver=5.8' type='text/css' media='all' />
    <div id="wp-post_content-editor-container" class="wp-editor-container"><textarea class="wp-editor-area" rows="8" autocomplete="off" cols="40" name="post_content" id="post_content"></textarea></div>
    </div>
    
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-text adverts-field-name-adverts_price ">
                
                            
                <label for="adverts_price">
                    Prix                            </label>
                
                <input type="text" name="adverts_price" id="adverts_price" class="adverts-filter-money"  />
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-text adverts-field-name-adverts_location ">
                
                            
                <label for="adverts_location">
                    Localité                            </label>
                
                <input type="text" name="adverts_location" id="adverts_location"  />
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-text adverts-field-name-website_address ">
                
                            
                <label for="website_address">
                    Website Address                            </label>
                
                <input type="text" name="website_address" id="website_address" autocomplete="off"  />
                            
                            
            </div>
                    
            <div class="adverts-control-group adverts-field-actions">
    
                <input type="submit" name="submit" value="Prévisualiser" style="font-size:1.2em" class="adverts-button adverts-cancel-unload" />
            </div>
            
        </fieldset>
    </form>

    cheers

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    i have sent you a message to the provided email address.

    The form HTML code will not help with the issue i am afraid, because it is more about what is rendered in the browser (including both HTML and JavaScript).

    Thread Starter alexandraka

    (@alexandraka)

    you were right, I removed the script, and now it is fine.
    thx for your support !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot upload picture’ is closed to new replies.