js and css filename being corrupted on publish with VS2013 - visual-studio-2013

I am publishing my Web App using the VS2013 publish mechanism. For some reason it has just started corrupting the js and css filenames. e.g.
From
<link href="/Content/bootstrap.css" rel="stylesheet"/>
To
<link href="/Content/css?v=puREEettBuwGkRK7y27hOQwXg4qvcAYRnG8wxc0gvnU1" rel="stylesheet"/>
This is only happening on publish to the live site. It works fine on publish to the localhost site. It looks like possibly some kind of versioning.
The defined bundles in BundleConfig are not being expanded, instead parsed with the above result.
Any ideas? I have not seen it before and its not showing up on Google searches. Thanks for any suggestions.
ANSWER:
For anyone else getting this problem - Once I realised it was the Bundles I found this which gave a lots of thoughts. However my specific issue was that I had installed Select2 via NuGet which had added a css directory in Content. As I was creating a Bundle pointing at Content\css these clashed. I removed the css directory and republished. Still didn't work. But when I removed that directory on the server manually it all started working again.

Related

Laravel view problems after changing the server

I'm having a weird problem with Laravel application which has been at Linux Server previously and was working fantastic but while moving to a new IIS Server, I faced alot of problems and the last problem here is some problems in view, while css and JS files are loaded and there is no error in console.
I have posted this question previously, now I'm re-posting it again with more details.
e.g. In local and previous host the fonts are good and everything works correctly, but in IIS server the fonts are bigger than normal and in local and previous server,The Pop Ups are Shown and the fonts are fine As shown in this photo, but, in IIS server, The background gets dark but the popup is not shown and the fonts are bigger Like this photo.
When I check it via Inspect elements from Chrome no error is there and all CSS and JS files are loaded correctly, while everything works but all fonts are bigger and some designs are ruined.
What I have tried:
I tried php artisan dump-autoload and php artisan serve.
Updated the composer.
Cleared the cache.
rewrited the mod and removed index.php from the link.
However, none of them works. I'm loading CSS and JS Files this way: <link rel="stylesheet" href="{{ URL::asset('assets/css/mystyle.css') }}"> and <script src="{{ URL::asset('assets/js/main.js') }}"></script>.
It looks like a very strange and weird problem, I don't know what is wrong while every CSS and JS files as well as every option works fine, but the fonts are bigger, some padding are ignored and some designs are ruined, while in localhost and previous server it was fine.
Can anybody help? and say what is wrong with this?
your problem is not familiar but any way here some tips :
in IIS server you should use URL::secure to connect with assets
post some code so we can find something wrong
use firefox developer edition to find your css problems in production
find the css selectors that effects your font in production

My Foundation Icons are not working in Firefox. Only letters in a box display instead

The Html
<link rel=stylesheet href=../static/css/foundation-icons/foundation-icons.css>
<a class="button radius search-header"><i class="fi-magnifying-glass"></i> Search</a>
I have navigated to foundation-icons.css after hitting Ctrl+U within Firefox so I am definitely linking to the file correctly.
I have copied the foundation-icons folder exactly and not removed anything. It looks like this:
./static/css/foundation-icons/
- foundation-icons.css
- foundation-icons.eot
- foundation-icons.svg
- foundation-icons.ttf
- foundation-icons.woff
- svgs/*
- preview.html
Edit: I have changed the title and added the Firefox tag because everything seems to be working fine in Chromium. I am a little stumped because that means it's a Firefox issue and probably not possible for me to fix.
The preview.html file that comes with foundation-icons works correctly in my Firefox as well.
If you're using the SCSS files, you should point the $fi-path variable to the correct location of your foundation-icon-fonts folder.
For me I had to add the following before importing foundation-icon-fonts:
$fi-path: 'foundation-icon-fonts';
First correct this:
<link rel="stylesheet" href="../static/css/foundation-icons/foundation-icons.css">
In examples of Foundation, Firefox use .woff files. Check if you have access to them.
It's a relative path. Are you sure 'static' folder is reachable with your browser ?

Are include files necessary in an html website?

Are include files, such as server side include SSI, files necessary in an html website?
I recently tried to host my simple html website through GoDaddy. I used Dreamweaver CC to upload my files and encountered a problem. Some of my pages were not displaying images or css. I checked to see if the images and css were on the server and in the correct places and they were. Confused, I called GoDaddy's customer service, waited 35 minutes, and talked to one of their customer service reps. He basically told me that it may be my code and that I need 'include' files.
I have looked all over the web and I'm still not entirely sure what an include file is... I got from my research that they are snips of code that call images/files without having to write out the same thing on every page. If I have copied and pasted the same thing on every page, why then would I need an 'include' file? I previously had my website hosted through Hostmonster, still do now, and I have never had to alter my code...
I am still new to the world of coding, so please be kind. If anyone knows of a good resource to help explain the use of 'include' files please post it or correct me if I am wrong. Thank you.
I think the GoDaddy "support" guy was talking about the include operation in your html files that you need to fetch your css files.
Presumably your web pages work correctly when you display them locally on your development machine -- the machine where you run Dreamweaver. If not, fix them. They'll probably need css files in some subdirectory (or maybe in the same directory as the html) and image files in some other subdirectory.
Open up your page, on the server, in a browser, and then do View Source. Look for your css file download commands ... which may look something like this ... in your source.
<link href="styles.css" rel="stylesheet" type="text/css" />
Are the links (the href items) what you thought they should be? Sometimes you'll find that they are absolute links like
file:\\d\myfiles\website\dreamweaver\some_other_junk\styles\foo.css
If they are you need to change them to
styles/foo.css
The same goes for images.
And, no, you don't need server-side include files to put up a working static web site.

Visual Studio 2012 saying 'Unable to edit' when including remote CSS file

I have included the CDN of the bootstrap CSS in my project. Everything works absolutely fine, except when I type
<div class="
Then Visual Studio pops up an error saying:
Unable to edit
'http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css'.
here`The style sheet must be part of the current project and the project must be a Web Site or Web Application project
I can hit OK to dismiss these errors, and then everything works fine as well - it reads the CSS classes and populates Intellisense and works correctly when I build. But why is Visual Studio trying to edit the remote CSS file? How can I tell it not to?
I was having the same problem and a little search brought me to the following page:
http://forums.asp.net/t/1586914.aspx?Unable+to+edit+CSS+file+
In a nutshell: Add a fake parameter to the end of your CDN URL to get rid of your errors. This also makes intellisense work correctly.
Example:
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css?parameter=1" rel="stylesheet">

Javascript references aren't working ASP.NET Development Server?

I'm not sure what's going on here. I've reformed the links in every way I can think of to try and reference my Script libraries, but nothing seems to work.
When I upload it to my web host it works fine, locally it doesn't work at all.
The weirdest part is, it references my CSS files fine and nothing else seems to have any issues.
//Works
<link href="#Url.Content("~/Content/main.css")" rel="stylesheet" type="text/css" />
//Doesn't work
<script src="#Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
I'm not sure what could be going on here or really even where to debug from here. I've tried removing the #Url.Content(...) and pointing directly to the directory, but that doesn't do anything at all. Hopefully someone else has run into this issue and has figured out a solution.
Using: ASP.NET MVC3 Razor, Visual Studio 2010 Professional
If you're using the default directory setup then your Scripts folder is a sub-directory of the Content folder; in which case:
<script src="#Url.Content("~/Content/Scripts/jquery-1.5.1.min.js")"></script>

Resources