Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Damian Green 452 posts 1433 karma points
    Jan 07, 2014 @ 17:45
    Damian Green
    0

    Blank template outputting scripts on it own!?? Am i going mad? (v6.1.6)

    I have got a blank template (called NoCode)  that is top level (Master) and there is nothing on it but when i open it with the alias http://site.com/nocode there are scripts for jquery validation and unobtrustive validation getting output like so:

    <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
     <script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>

    Where on earth is that coming from?

    If it add the following i get the same

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
    }

    I also get the same if i add a child template and a RenderBody() 

    This is using the latest v6 release (6.1.6) but i have upgraded the site from v4

    Any ideas anyone? Its baffling me.

     

     

  • Damian Green 452 posts 1433 karma points
    Jan 07, 2014 @ 18:09
    Damian Green
    0

    Ive tried on a clean install of v6 and im not getting this so something must be lurking in the corners from the old version maybe?

    The site WAS built using WebForms on v4.7.1 an di have upgraded to 6.1.6 and switched it to MVC.

    It only seems to be doing this on my new MVC templates and not on the existing webforms templates.

     

  • Damian Green 452 posts 1433 karma points
    Jan 07, 2014 @ 18:10
    Damian Green
    0

    Update...

    I just trued removing the child template and the render body and added to some html and now this is what is getting squirted out:

    From template:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
    }
    
    <!DOCTYPE html>
    <html>
    <p>help</p>
    </html>

    To rendered html:

    <!DOCTYPE html>
      <html>
      <head>
      <meta charset="utf-8" />
      <title></title>
      <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
      <script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
      <script src="/Scripts/modernizr-1.7.min.js" type="text/javascript"></script>
      </head>
       
      <body>
       
      <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
      <script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
       
       
      <!DOCTYPE html>
      <html>
      <p>help</p>
      </html>
       
      </body>
      </html>

    Its gone potty! What could cause this?

     

  • Damian Green 452 posts 1433 karma points
    Jan 07, 2014 @ 18:19
    Damian Green
    0

    btw - i have added the body tag in etc to make it valid html and still the same (not that i thought it would help).

     

  • Jeavon Leopold 3074 posts 13631 karma points MVP 11x admin c-trib
    Jan 07, 2014 @ 18:34
    Jeavon Leopold
    0

    Hi Damian,

    Seems pretty crazy, only thing I can think of is that there could be a route hijacking custom controller that could be injecting this markup, is that possible?

    Jeavon

  • Damian Green 452 posts 1433 karma points
    Jan 07, 2014 @ 18:44
    Damian Green
    100

    Got the little sucker!

    After searching the umbraco source code and found nothing i started looking at the views and pages in the deployment and found a _viewstart file in the Views folder that had the 2 jquery validation js files!

    However that doesnt explain where the modernizer ones came from???? 

    Anyway the main problem is solved - so check for viewstart files if you get any rogue html etc.

    Damian

     

  • Mike Chambers 636 posts 1253 karma points c-trib
    Jan 07, 2014 @ 18:59
    Mike Chambers
    1

    Did the other includes come from the \Views\shared\_layout.cshtml ???

  • Damian Green 452 posts 1433 karma points
    Jan 08, 2014 @ 10:15
    Damian Green
    0

    Yes! :) 

    I have a feeling these are some left behind files from when i was looking at using MVC on this site when the first MVC packages were coming out after v5 died.

    Ive used MVC quite a bit but you forget about things like this when using Umbraco.

    Cheers Mike.

    Damian

     

Please Sign in or register to post replies

Write your reply to:

Draft