[FIXED] [#1285] [4.0.0-rc] ItemTag validation (_tkn_1): Reference token (ext.net.global.icons) was not found

  1. #1

    [FIXED] [#1285] [4.0.0-rc] ItemTag validation (_tkn_1): Reference token (ext.net.global.icons) was not found

    After upgrading from Ext.Net 2.x to 3.3 I get that exception for all partially loading panels.

    It was not an issue before the upgrade.

    I return views from an mvc controller like this:

    return new Ext.Net.MVC.ComponentConfigResult(viewName: view);
    The error occurs when the ActionResult is being processed.

    Do I have to do this differently in version 3.3 and upwards? I also got the same issue with version 4 rc.
    Last edited by Daniil; Mar 14, 2016 at 11:00 AM. Reason: [FIXED] [#1285] [4.0.0-rc]
  2. #2
    These views do not define a ResourceManager. They have always worked without that. Could this the a problem in newer versions?
  3. #3
    Additional info:

    The error occurs only when the loaded component is using icons, like .Icon(Icon.Color)
  4. #4
    Hello,

    We are attempting to reproduce.

    I would be very helpful if you could post a simplified sample demonstrating how to reproduce the scenario. We'll try out best to reproduce based on your description.
    Geoffrey McGill
    Founder
  5. #5
    Controller code:

    return new Ext.Net.MVC.ComponentConfigResult(viewName: view);
    View code:

    @Html.X().Panel().Icon(Icon.Color)
    Last edited by geoffrey.mcgill; Mar 14, 2016 at 4:38 AM.
  6. #6
    I have reproduced the problem and am investigating.

    This appears to be a culprit - .Icon(Icon.Color). If remove this setting, then it works.

    Here is a full sample I am dealing with.

    Main View
    @{
        var X = Html.X();
    }
    
    <!DOCTYPE html>
    <html>
    <head>
        <title>Ext.Net.MVC v3 Example</title>
    </head>
    <body>
        @X.ResourceManager()
    
        @(X.Panel()
            .Loader(X.ComponentLoader()
                .Url(Url.Action("Partial"))
                .Mode(LoadMode.Component)
            )
        )
    </body>
    </html>
    Partial View
    @{
        var X = Html.X();
    }
    
    @* This doesn't work *@
    
    @X.Panel().Title("Partial").Icon(Icon.Color)
    
    @* This works:
    @X.Panel().Title("Partial")
    *@
    Controller
    public ActionResult Index()
    {
        return this.View();
    }
    
    public ActionResult Partial()
    {
        string view = "Partial";
    
        return new Ext.Net.MVC.ComponentConfigResult(viewName: view);
    }
  7. #7
    The issue has been fixed in the v3 and v4. The fix will be included into the next public release - 4.0.0-rc.

    Thank you for the report!
  8. #8
    If you use the partial view only in a conjunction with a ComponentConfigResult, then this might be tried as a workaround before the release:
    @{
        var X = Html.X();
        
        // That is a workaround for #1285.
        // It can be used only if the partial view is used with a ComponentConfigResult
        MvcResourceManager.SharedConfig.RenderStyles = ResourceLocationType.None;
    }
    
    @(X.Panel()
        .Title("Partial")
        .Icon(Icon.Color)
    )

Similar Threads

  1. Replies: 17
    Last Post: Jun 26, 2014, 2:43 PM
  2. Replies: 0
    Last Post: Jun 23, 2014, 1:08 PM
  3. Replies: 4
    Last Post: Dec 13, 2013, 7:49 PM
  4. [CLOSED] Reference token (ext.net.initscriptfiles) was not found.
    By jesperhp in forum 2.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 08, 2013, 10:24 AM
  5. Replies: 5
    Last Post: Jun 11, 2013, 7:46 AM

Posting Permissions