"Insert" button doesn't get enabled

Issue #7 resolved
Gábor Veres created an issue

Using 1.7.2 on Confluence 5.3.4 (build 4532). When using the macro, after selecting all values in the dropdowns, the Insert button doesn't get enabled, so I can not insert the macro - basically this renders the add-on unusable for me.

Comments (15)

  1. Mitchel Kuijpers

    Hi there, This seems like a serious bug. Do you have any more details (Which browser and which version of the browser) And could you check if there are any javascript errors in the browser?

    We will fix this ASAP!

  2. Gábor Veres reporter

    I'm on Mac OSX 10.9.2, Chrome 33.0.1750.146 Will try this on other browsers also and get back to you with the results. Here's the JavaScript console output - nothing serious at first sight, but previewMacro is complaining... Is there a way to enable debug logging for your addon through the console?

    loading macro browser took 159ms batch.js:9429
    Open macro browser to edit macro: view-git-file batch.js:9429
    function (){return(b.parent().width()/10)} batch.js:224
    AJS.Confluence: run binder components batch.js:9429
    previewMacro: missing required params batch.js:9429
    Autocompleter.Control - die : Already dying, returning. batch.js:9429
    Autocompleter.Control - after : blocked by onAfterKey: 13 batch.js:9429
    Autocompleter.Control - die : Removing autocomplete-control keyboard listeners. 
    
  3. Gábor Veres reporter

    Same behavior on Firefox 27.0.1 (same OS), so it doesn't seem to be browser-related.

    An additional issue I've found (and might be related, so I'm posting here - let me know if I should open a new issue ticket for this): I'm a confluence admin, and for the dropdowns to have any content at all, I need have admin access rights - meaning having the "You have temporary access to administrative functions..." bar at the top of the page. So if I first visit site config and I don't drop access before using the macro, the dropdowns have content, but if I drop the access, they are empty. The related 401 (Unauthorized) status for the REST call looks like this:

    GET https://mysite:8090/rest/git-plugin/1.0/repositories?_=1394546593429 401 (Unauthorized) batch.js:8242
    

    and the response is:

    <status>
    <status-code>401</status-code>
    <message>This resource requires WebSudo.</message>
    </status>
    
  4. Gábor Veres reporter

    And - same behavior for both findings on Safari as well ( Version 7.0.2 (9537.74.9) ). Same OS as before.

  5. Mitchel Kuijpers

    I cannot reproduce any of the above bugs just started a clean version of Confluence version 5.3.4 and installed Git-Addon version 1.7.2. And i also have a Macbook with mavericks. Do you use any other add-ons with the Git-Addon?

  6. Gábor Veres reporter

    I'm attaching the complete plugin list, but here are the ones that are added to the basic install and might interfere: * - Adaptavist Content Formatting Macros * - Bob Swift Software - Markdown * - Evernote Integration Plugin * - Gister * - Gliffy Confluence Plugin

    I'd be happy to do some debugging on our install - just give me some pointers (logging settings, etc.). Thanks for looking into this!

  7. Gábor Veres reporter

    FYI - if I manually remove the "disabled" attribute from the button and click it, the macro works fine (inserts the contents properly)

  8. Mitchel Kuijpers

    That's a good thing that means it is a javascript issue.

    But I still can't reproduce it I installed trials of al the plugins in a clean confluence 5.3.4 and the button still enables. If the button is disabled can you click the preview button? (the refresh icon thingy in the macro browser).

  9. Mitchel Kuijpers

    @gveres Could you run this in the console for me when you filled in all the details I seem to have found the issue:

    AJS.$("#macro-insert-container .macro-param-div.required .macro-param-input").each(function(el){ console.log($(this).val()) });
    

    And paste the output here :)

  10. Gábor Veres reporter

    @mitchelkuijpers, see the output below.

    Thanks a lot for working on this, I have two questions remaining: - is there a way for me to get a new build that includes the fix, or should I wait for the deployment to the market? - the other issue I have mentioned a few comments ago (have to have admin rights to have content in the three dropdowns) is unrelated, right? Should I create a separate issue for that?

    AJS.$("#macro-insert-container .macro-param-div.required .macro-param-input").each(function(el){ console.log($(this).val()) });
     VM96:2
    1 VM96:2
     VM96:2
    gh-pages VM96:2
     VM96:2
    cookbook.html VM96:2
    [
    <div class="select2-container text macro-param-input aui-select2-container" id="s2id_macro-param-repository-id" style="width:​ 100%;​">
    <a href="javascript:​void(0)​" onclick="return false;​" class="select2-choice" tabindex="-1">
    <span class="select2-chosen">GitHub/Git reference</span>​
    <abbr class="select2-search-choice-close"></abbr>​
    <span class="select2-arrow">
    <b></b>​
    </span>​
    ::after
    </a>​
    <input class="select2-focusser select2-offscreen" type="text" id="s2id_autogen1" tabindex="0">
    </div>​
    , 
    <input type="text" class="text macro-param-input select2-offscreen" id="macro-param-repository-id" tabindex="-1">
    , 
    <div class="select2-container text macro-param-input aui-select2-container" id="s2id_macro-param-branch" style="width:​ 100%;​">
    <a href="javascript:​void(0)​" onclick="return false;​" class="select2-choice" tabindex="-1">
    <span class="select2-chosen">gh-pages</span>​
    <abbr class="select2-search-choice-close"></abbr>​
    <span class="select2-arrow">
    <b></b>​
    </span>​
    ::after
    </a>​
    <input class="select2-focusser select2-offscreen" type="text" id="s2id_autogen2" tabindex="0">
    </div>​
    , 
    <input type="text" class="text macro-param-input select2-offscreen" id="macro-param-branch" tabindex="-1">
    , 
    <div class="select2-container text macro-param-input aui-select2-container" id="s2id_macro-param-path" style="width:​ 100%;​">
    <a href="javascript:​void(0)​" onclick="return false;​" class="select2-choice" tabindex="-1">
    <span class="select2-chosen">cookbook.html</span>​
    <abbr class="select2-search-choice-close"></abbr>​
    <span class="select2-arrow">
    <b></b>​
    </span>​
    ::after
    </a>​
    <input class="select2-focusser select2-offscreen" type="text" id="s2id_autogen3" tabindex="0">
    </div>​
    , 
    <input type="text" class="text macro-param-input select2-offscreen" id="macro-param-path" tabindex="-1">
    
  11. Log in to comment