[CLOSED] Error with ResourcePlaceholder for scripts in MVC: Reference token (ext.net.initscriptfiles) was not found.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Error with ResourcePlaceholder for scripts in MVC: Reference token (ext.net.initscriptfiles) was not found.

    Hi,

    I have latest code, and a simple test MVC view:

    @{
        Layout = null;
    }
    <!DOCTYPE html>
    <html>
        <head>
            <title>Resource placeholder test</title>
        
            @Html.X().ResourcePlaceHolder(ResourceMode.Style)
        
            @Html.X().ResourcePlaceHolder(ResourceMode.Script)
        </head>
        <body>
            @Html.X().ResourceManager()
            
            <p>Test</p>
        </body>
    </html>
    The controller is this:

    using System.Web.Mvc;
    
    namespace Ext.Net2.Tests.Controllers
    {
        public class ResourcePlaceholderTestController : Controller
        {
            //
            // GET: /ResourcePlaceholderTest
            //
            public ActionResult Index()
            {
                return View();
            }
        }
    }
    When I run this page I get the following error:

    ItemTag validation (_tkn_1): Reference token (ext.net.initscriptfiles) was not found.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    
    Exception Details: System.Exception: ItemTag validation (_tkn_1): Reference token (ext.net.initscriptfiles) was not found.
    
    Source Error:
    
    
    Line 137:                }
    Line 138:
    Line 139:                throw;
    Line 140:            }
    Line 141:        }
    
    
    Source File: d:\Ext.Net\2.x\Ext.Net\Core\ExtNetTransformer.cs    Line: 139
    
    Stack Trace:
    
    
    [Exception: ItemTag validation (_tkn_1): Reference token (ext.net.initscriptfiles) was not found.]
       Transformer.NET.ItemTag.Validate() +156
       Transformer.NET.TextTransformer.Handle() +159
       Transformer.NET.TextTransformer.Transform(List`1 tokensType, Dictionary`2 variables) +28
       Transformer.NET.TextTransformer.Transform(List`1 tokensType) +11
       Transformer.NET.TextTransformer.Transform() +27
       Ext.Net.ExtNetTransformer.Transform(String text) in d:\Ext.Net\2.x\Ext.Net\Core\ExtNetTransformer.cs:139
       Ext.Net.InitScriptFilter.Transform() in d:\Ext.Net\2.x\Ext.Net\Core\InitScriptFilter.cs:69
       Ext.Net.InitScriptFilter.Flush() in d:\Ext.Net\2.x\Ext.Net\Core\InitScriptFilter.cs:57
       System.Web.HttpWriter.FilterIntegrated(Boolean finalFiltering, IIS7WorkerRequest wr) +9684129
       System.Web.HttpResponse.FilterOutput() +104
       System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +49
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
    The CSS resources placeholder is fine; it is just the JavaScript placeholder that doesn't work. If I comment out or remove this line, then the error goes away:

    @Html.X().ResourcePlaceHolder(ResourceMode.Script)
    If it helps, I also created a new project and installed the latest Ext.NET.MVC Package from NuGet, and edited the Ext.NET razor view to insert the two resource placeholders, and got the same error.
    Last edited by Daniil; Nov 22, 2013 at 10:31 AM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] Token is not unique error for nested grid
    By alscg in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 01, 2013, 4:53 AM
  2. [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
  3. Replies: 5
    Last Post: Jun 11, 2013, 7:46 AM
  4. Replies: 5
    Last Post: Nov 12, 2012, 7:41 AM
  5. Replies: 4
    Last Post: Mar 30, 2012, 7:30 PM

Tags for this Thread

Posting Permissions