TypeError: r is undefined

4 posts, 0 answers
  1. Ashleigh L
    Ashleigh L avatar
    113 posts
    Member since:
    Jun 2012

    Posted 16 Jun Link to this post

    I'm getting an error when trying to navigate to a route:

    TypeError: r is undefined

    kendo.all.min.js (line 26, col 20881)

     

    All I've done is set up a basic router, with one route and receive this error when trying to navigate to that route.

    HTML:

    <div class="col-sm-3 col-lg-2 zero-padding sidebar sidebar-fixed">
        <div class="col-sm-3 col-lg-2 sidebar-fixedsub zero-padding">
            <ul id="accordion" class="accordion side-menu">
                <li class="hidden-xs">
                    <div class="sidebar-actions">
                        <button id="menu_resize" data-role="button" class="k-button resize-menu-level-1" role="button" aria-disabled="false" data-level="1">
                            <i class="fa-icon-bars"></i>
                        </button>
                    </div>
                </li>
                <li id="subscribed">
                    <a class="link k-link"><i class="fa-icon-comments"></i><span class="nav-item-text nav-item-text-main">Subscribed</span></a>
                        <ul class="submenu">
                            <li><a onclick="navigateContainer($(this));"><span class="nav-item-text">Subscription 1</span><span class="badge">5</span></a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>

    Router JS:

    var router = new kendo.Router({
        routeMissing: function(e) {
            e.preventDefault();
        }
    });
     
    router.route("/", function() {
        generateDiscussionView();
    });
     
    router.route("/thread/:containerid", function(containerid) {           
        triggerContainer(container);
    });
     
    $(function() { 
        router.start();
    });

    Main JS:

    function navigateContainer(container) {
        router.navigate("/thread/" + container);
    }
     
    function triggerContainer(container) {     
        generateDiscussionView();          
    }

  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 20 Jun Link to this post

    Hi,

    this does not seem like a known issue. Can you replicate it in a Dojo?

    Regards,
    Petyo
    Telerik
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
  4. Ashleigh L
    Ashleigh L avatar
    113 posts
    Member since:
    Jun 2012

    Posted 20 Jun in reply to Petyo Link to this post

    No, it's pretty reliant on our Coldfusion backend, but I have posted a publicly-accessible demo here: http://app.smarteru.com/custom/kendo/messagecentre/

    And I've attached the code for the demo as well.

    Ignoring the styling issues, when the page loads it should try and generate a discussion for the first sub-item in the nav (there's an alert). Then if you click another sub-item, it should attempt to generate the discussion for that item, but instead gives the JS error.

    Note: On our live site, where the demo is hosted, we're using v2015.3.930. I updated our alpha site to v2016.2.607 last week, to see if that would resolve the issue. It didn't, but the error on that version is "TypeError: o is undefined" kendo.all.min.js (line 26, col 20977)

  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 22 Jun Link to this post

    Hello shimmoril,

    The provided web page uses nested full HTML documents, which is not allowed by web standards and can cause undesired side effects. Please make sure that the application's HTML markup is valid and that the views are HTML snippets, not full HTML pages. Also ensure that jQuery and Kendo UI scripts are not registered multiple times on the page.

    At any case, the routing and the views should not be related to the backend you are using.

    If the discussed problem persists after fixing the problem with the nested full HTML documents, and you need additional assistance, please provide a simple isolated runnable example that does not include irrelevant custom logic and third-party dependencies (e.g. ColdFusion). The live URL that you have posted is a full fledged production setup - I am afraid that we can't use it for troubleshooting purposes. 

    Regards,
    Dimo
    Telerik
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top
Kendo UI is VS 2017 Ready