This project is read-only.
1
Vote

Core.TaxonomyPicker - Sometimes it does nothing

description

Sometimes when I load a page with 4 taxonomy pickers on the page, it just does nothing.

No exceptions thrown when debugging, no logs in console.

Rendered when nothing happens
<h3 class="ms-core-form-line">Areas</h3>
<div class="ms-core-form-line" style="margin-bottom: 0px;">
    <div class="cam-taxpicker">
        <input name="areas" id="areas" type="hidden">
    </div>
    <div class="cam-taxpicker-suggestion-container" style="display: none;"></div>
</div>
Rendered when working
<h3 class="ms-core-form-line">* Areas</h3>
<div class="ms-core-form-line" style="margin-bottom: 0px;">
    <div class="cam-taxpicker">

        <div class="cam-taxpicker">
            <div class="cam-taxpicker-editor" contenteditable="true"><span class="cam-taxpicker-term-invalid"></span></div>
            <div class="cam-taxpicker-button"></div>
            <input name="areas" id="areas" type="hidden"></div>
        <div class="cam-taxpicker-suggestion-container" style="display: none;"></div>
    </div>
    <div class="cam-taxpicker-suggestion-container" style="display: none;"></div>
</div>
Loading js
var spHostUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
var appWebUrl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
var layoutsRoot = spHostUrl + '/_layouts/15/';

$.getScript(layoutsRoot + 'SP.Runtime.js',
    function () {
        $.getScript(layoutsRoot + 'SP.js',
            function () {
                $.getScript(layoutsRoot + 'init.js',
                    function () {
                        $.getScript(layoutsRoot + 'sp.taxonomy.js',
                            function () {
                                $('#evenmoremetadata').taxpicker({ isMulti: true, allowFillIn: false, termSetId: 'Q3B48CC8-EA1C-4EDE-A5C2-DB10D9D081CD' }, context);
                                $('#areas').taxpicker({ isMulti: true, allowFillIn: false, termSetId: 'B4QF0B05-59D2-42C5-BA39-413QQ5AB9EBC' }, context);
                                $('#metadata').taxpicker({ isMulti: false, allowFillIn: true, termSetId: '0EC92D30-0B11-483F-9C11-Q0Q29146D01B' }, context);
                                $('#moremetadata').taxpicker({ isMulti: false, allowFillIn: true, termSetId: '1611B362-508F-4B3B-8B84-21QC4180AB01' }, context);
                            });
                    });
            });
    });

comments

vesaj wrote Jul 2, 2014 at 8:07 AM

Thanks for your input. We should have this one fixed in the latest July release of the package.

Just as additional note - We are looking into turning Office AMS as a open source project in future, so that external field can also start fixing these by them self in future, since our project don't have any resources on actually supporting the field related on these proof of concepts. Hoping to get this one done by early August.

pbjorklund wrote Jul 7, 2014 at 5:20 PM

Great news and thanks for taking the time to fix these things Vesa.

Do you remember what caused this particular bug?

(I will report back if the issues are resolved after I return from vacation)

vesaj wrote Jul 7, 2014 at 9:23 PM

Sorry but I don't have the details for this one. This was fixed by different persons who have participated on sharing the code for the community. I've been just working as a messenger for this particular bug.

I did reach out for the responsible person, but could not get any additional details at least for now.