This is a migrated thread and some comments may be shown as answers.

TypeError: r is undefined

3 Answers 646 Views
SPA
This is a migrated thread and some comments may be shown as answers.
Ashleigh L
Top achievements
Rank 1
Ashleigh L asked on 16 Jun 2016, 06:23 PM

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();          
}

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 20 Jun 2016, 08:15 AM
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.
 
0
Ashleigh L
Top achievements
Rank 1
answered on 20 Jun 2016, 05:54 PM

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)

0
Dimo
Telerik team
answered on 22 Jun 2016, 10:53 AM
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.
Tags
SPA
Asked by
Ashleigh L
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Ashleigh L
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or