This project is read-only.

Taxonomy picker - Loading TermSet failed

Apr 23, 2014 at 3:34 PM

First of all thank you for this great contribution!

I'm having this problem when using a part of your solution (taxonomy picker) in the following scenario:

I have a blank webpart page, with a 'script editor' webpart on it and following code:
<script src="/Style%20Library/jquery-1.11.0.min.js"></script>
<link rel="Stylesheet" type="text/css" href="/Style%20Library/taxonomypickercontrol.css" />
<script src="/Style%20Library/taxonomypickercontrol.js" type="text/javascript"></script>
<script src="/Style%20Library/taxonomypickercontrol_resources.en.js" type="text/javascript" ></script>
<script type="text/javascript">
$(document).ready(function () {
   var layoutsRoot = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";

    //load all appropriate scripts for the page to function
    $.getScript(layoutsRoot + 'SP.Runtime.js', function() {
        $.getScript(layoutsRoot + 'SP.js',
            function() {
                //Load the SP.UI.Controls.js file to render the App Chrome
                $.getScript(layoutsRoot + 'SP.UI.Controls.js');

                //load scripts for calling taxonomy APIs
                $.getScript(layoutsRoot + 'init.js',
                    function() {
                        var context = SP.ClientContext.get_current();
                        $.getScript(layoutsRoot + 'SP.Taxonomy.js',
                            function() {
                                $('#taxPickerKeyword').taxpicker({ isMulti: false, allowFillIn: false, termSetId: '9395179b-eb45-4cbe-9442-7b68e3e047fc' }, context);

<input type="hidden" id="taxPickerKeyword" />
I also have the publishing feature activated and when editing the page in draft mode, everything works fine. I can access the term store, retrieve all terms sets, etc.
But when I publish the page to a major version, the following error is thrown:
Loading TermSet failed. please refresh your browser and try again
When debugging I found this additional information about the error;
The status code of response is '403'. The status text of response is 'FORBIDDEN'.
I'm accessing the page as Site Collection Admin.

Can someone please give some advice on what to do?