0

I had a compressed static resource file with lots of styling and javascript files. I just downloaded that file and re-uploaded again but after uploading it no styling and javascript is getting loaded.

I am really frustrated at this problem because not able to figure out the why is this happening for 2 hours

Static resource i uploaded with name : NewResource MIME Type application/x-zip-compressed

My code :

<apex:page controller="NMAT_LoginContoller" showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" title="Register">     

  <head>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/bootstrap.min.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/bootstrap-datetimepicker.min.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/chosen.min.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/styles/scss/style.scss')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/styles/scss/vars.scss')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/style.css.map')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/fonts.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/style.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/vars.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/vars.css.map')}"/>           
 </head>        

Rest of vf page

7
  • Request you to share your code what you've tried... Commented Jun 26, 2017 at 19:19
  • 1
    did you clear your browser cache? is the file being loaded? do you have any errors in your console? is the file loading in your network tab...Please update your post accordingly. Thanks
    – glls
    Commented Jun 26, 2017 at 19:19
  • Did you extract it and then compress again but compress at the wrong folder level? Commented Jun 26, 2017 at 19:47
  • 1
    Triple check the ZIP that you haven't introduced a folder at the root (before "assets").
    – Keith C
    Commented Jun 26, 2017 at 19:47
  • 1
    Dan Wooding was correct...i had my path wrong because of compression and decompression Commented Jun 26, 2017 at 20:28

1 Answer 1

3

I had a similar issue where this became an issue. What you need to do instead of doing "Send To > Compressed (zipped) folder" on the folder, do it on the files inside the folder.

When you compress the folder itself, you end up with "foo.zip/foo/bar.js" instead of "foo.zip/bar.js".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .