Copied to clipboard

Flag this post as spam?

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


  • Ben John Bagley 16 posts 146 karma points
    Oct 09, 2018 @ 20:25
    Ben John Bagley
    0

    No assets loading

    Hi,

    So I'm building a website and my website is showing all assets apart from one page, I've set up a document type, template and set up a blog post but I'm getting no assets

    enter image description here

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 09, 2018 @ 20:31
    Jan Skovgaard
    0

    Hi Ben

    I assume that you're experiencing this issue on the fronted of your website? Not in the Umraco backoffice, right?

    If you have a look at the network tab (Judging by the screenshot you appear to be using Chrome) and select the "CSS" filter can you then confirm that the path for you CSS file is indeed correct on that particular page?

    Perhaps it's an issue where you're using a relative path where instead you should be using an absolute path. So if you could perhaps share a code snippet from your layout / master file where you have setup the reference to the CSS file we can better help you figuring out if what I suggest is the issue :)

    Looking forward to hearing from you.

    Cheers, Jan

  • Ben John Bagley 16 posts 146 karma points
    Oct 09, 2018 @ 20:40
    Ben John Bagley
    0

    Hi Jan,

    Thank you for replying, this is an issue on the front-end.

    This is my master template

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = null;
    }
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta http-equiv="X-UA-Compatible" content="ie=edge">
      <title>Ben John Bagley</title>
    
      <link rel="stylesheet" href="./css/app.css">
    
      <!-- GDPR Banner -->
      <style type="text/css"> #iubenda-cs-banner { bottom: 0px !important; left: 0px !important; position: fixed !important; width: 100% !important; z-index: 99999998 !important; background-color: black; } .iubenda-cs-content { display: block; margin: 0 auto; padding: 20px; width: auto; font-family: Helvetica,Arial,FreeSans,sans-serif; font-size: 14px; background: #000; color: #fff;} .iubenda-cs-rationale { max-width: 900px; position: relative; margin: 0 auto; } .iubenda-banner-content > p { font-family: Helvetica,Arial,FreeSans,sans-serif; line-height: 1.5; } .iubenda-cs-close-btn { margin:0; color: #fff; text-decoration: none; font-size: 14px; position: absolute; top: 0; right: 0; border: none; } .iubenda-cs-cookie-policy-lnk { text-decoration: underline; color: #fff; font-size: 14px; font-weight: 900; } </style> <script type="text/javascript"> var _iub = _iub || []; _iub.csConfiguration = {"reloadOnConsent":true,"enableRemoteConsent":true,"banner":{"textColor":"white","backgroundColor":"black","applyStyles":false},"lang":"en","siteId":1203502,"cookiePolicyInOtherWindow":true,"cookiePolicyId":41608364}; </script><script type="text/javascript" src="//cdn.iubenda.com/cookie_solution/safemode/iubenda_cs.js" charset="UTF-8" async></script>
    </head>
    <body>
      <header>
        <nav role="navigation shadow">
          <div class="left">
            <a href="/">
              <h3>Ben John Bagley</h3>
            </a>
          </div>
    
          <div class="right mobile-toggle">
            <span>MENU</span>
            <i class="fa fa-bars"></i>
          </div>
    
          <div class="right mobile-nav animated fadeIn">
            @{
                var selection = Model.Content.Site().Children().Where(x => x.IsVisible());
            }
    
            @foreach(var item in selection){
                <a href="@item.Url">@item.Name</a>
            }
          </div>
        </nav>
      </header>
    
      @RenderBody()
    
      <footer>
        <nav role="navigation">
          <div class="left">
            <a href="/">
              <p style="margin-bottom: 0.5em">&copy; 2018 Ben John Bagley. All rights reserved.</p>
    
              <a href="https://www.iubenda.com/privacy-policy/41608364" class="iubenda-black no-brand iubenda-embed " title="Privacy Policy">Privacy Policy</a> <script type="text/javascript">(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);</script>
    
              <a href="https://www.iubenda.com/privacy-policy/41608364/cookie-policy" class="iubenda-black no-brand iubenda-embed " title="Cookie Policy">Cookie Policy</a> <script type="text/javascript">(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);</script>
            </a>
          </div>
    
          <div class="right">
            <a href="https://twitter.com/benbagley_">
              <i class="fa fa-twitter" aria-hidden="true"></i>
            </a>
    
            <a href="https://linkedin.com/in/ben-bagley" target="_blank">
              <i class="fa fa-linkedin" aria-hidden="true"></i>
            </a>
    
            <a href="https://github.com/benbagley">
              <i class="fa fa-github" aria-hidden="true"></i>
            </a>
          </div>
        </nav>
      </footer>
    
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.11/jquery.validate.unobtrusive.min.js"></script>
      <script src="https://use.fontawesome.com/1b21219bb9.js"></script>
      <script src="./js/app.js"></script>
    
      @if (TempData["UmbracoForms"] != null)
        {
            foreach (var form in (List<Guid>)TempData["UmbracoForms"])
            {
                Html.RenderAction("RenderFormScripts", "UmbracoForms", new { formid = form, theme = "default" });
            }
        }
    </body>
    </html>
    

    and this is my blog post template

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.BlogPost>
    @using ContentModels = Umbraco.Web.PublishedContentModels;
    @{
        Layout = "master.cshtml";
    }
    
    <!-- HERO -->
      <div class="blog-title" id="top">
        <div class="center">
          <h1 class="text-4xl">Spiderman - PS4 Review</h1>
        </div>
      </div>
    
      <!-- BLOG -->
      <div class="blog" id="blog">
        <div class="content">
          <div class="blog-inner_show">
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum efficitur sollicitudin sapien, in convallis nisi aliquet et. Morbi eu arcu diam. Maecenas porttitor justo nec est hendrerit, nec pretium ligula pellentesque. Nunc at fringilla eros, sit amet rutrum ipsum. Sed id pulvinar dui. Donec at orci id nunc tristique blandit sit amet a elit. Proin urna nisi, facilisis non lorem sit amet, luctus congue magna. Maecenas aliquam augue sed nisl facilisis, at semper enim consectetur. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce id magna at tortor finibus sodales. Mauris fringilla bibendum ultricies. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur fringilla placerat lectus, a varius metus vehicula ut.
    
    Fusce sodales dui in viverra laoreet. Donec tempus lectus ac pharetra dictum. Praesent efficitur lorem at odio pharetra, sed tempor ante elementum. Pellentesque ac sem quis justo tempus blandit. Morbi nec hendrerit urna, varius auctor tortor. Morbi nec ante ac lacus ornare laoreet sit amet eu nunc. Donec vitae convallis lorem. Nullam vitae metus vel ex ultrices imperdiet. Ut tincidunt malesuada erat, vitae ullamcorper neque aliquam vel. Nunc accumsan leo a nibh dictum, id pellentesque elit consequat. Quisque malesuada vulputate efficitur. Aenean vitae eleifend libero. Fusce tellus libero, rhoncus eu vulputate non, pellentesque quis massa. Ut pretium vitae nisi eget hendrerit. Nam id rutrum turpis. Praesent molestie, nibh at gravida tempus, nulla sapien egestas leo, eu bibendum libero eros a nisi.
    
    Ut semper convallis magna, sed fermentum dui sodales ornare. Aliquam sed tortor hendrerit, ultricies sem quis, sollicitudin metus. Aenean viverra urna nulla, sit amet auctor libero aliquet a. Nullam ornare tempor aliquet. Suspendisse blandit molestie tellus ac porttitor. Aliquam lorem purus, commodo in sollicitudin eu, consequat at dolor. Donec convallis lectus quam, pretium sollicitudin enim aliquam quis. Aliquam ac nibh vitae massa venenatis lobortis sit amet et nulla. Sed eget augue eleifend odio aliquet hendrerit nec quis erat. Maecenas varius efficitur sapien eu porta. Duis volutpat lectus eu diam finibus, a hendrerit elit interdum. Nunc quis condimentum mi. Ut tincidunt mattis lectus eget placerat.
    
    Cras non nulla arcu. Suspendisse gravida nulla mi, non pellentesque dolor scelerisque quis. Praesent vel euismod augue, non feugiat tortor. Nulla finibus, erat non accumsan euismod, ante lorem aliquet nunc, vel aliquet dui nulla quis nunc. Vestibulum iaculis diam ac ipsum luctus consectetur at et nibh. Sed ligula arcu, mattis ut justo sed, maximus posuere ex. Curabitur eu tellus libero. Vivamus porttitor cursus egestas. Nullam aliquam maximus dui.
    
    Maecenas quis nunc vitae lectus ultrices cursus in nec enim. Curabitur ultrices purus ut efficitur varius. Donec rutrum turpis quis diam commodo pretium sit amet sit amet ipsum. Sed eu ullamcorper lorem. Vestibulum augue purus, sagittis non tempor eu, pulvinar vel quam. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce a ipsum in risus tincidunt feugiat. Aliquam in ex id lorem malesuada malesuada. Cras pharetra tincidunt erat, quis commodo mauris commodo eget. Nam ultricies cursus est, id dictum mi molestie non. Pellentesque tincidunt purus placerat tortor suscipit, eu ultrices ex fringilla. Sed blandit leo ut magna convallis, sit amet venenatis est consequat.
    
    </p>
        </div>
      </div>
    </div>
    

    All other pages, their assets are working, so I must be missing something somewhere.

  • Ben John Bagley 16 posts 146 karma points
    Oct 09, 2018 @ 21:03
    Ben John Bagley
    100

    Got it Jan, it was the paths on my css and js files.

    Thank you for looking into it though.

Please Sign in or register to post replies

Write your reply to:

Draft