Jump to:

23491 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Javascript files in Assets folder

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1525 Views
  • micahsheets
    Avatar
    Community Member
    164 Posts

    Javascript files in Assets folder Link to this post

    Why are there three javascript files in the assets folder? I am using the files from trunk. I would like to only have asset files in my assets folder so it doesn't confuse the end user. If someone deletes those files sometimes they get put back automatically or the admin site never loads after login.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Javascript files in Assets folder Link to this post

    These are created by the new javascript combiner in Sapphire. Note sure why it was decided to put them in the assets folder though - it's something that was raised in the developer group and should be fixed. Try the /branches/2.3 version and see if they still appear.

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: Javascript files in Assets folder Link to this post

    I'm using SS 2.3.1 and have the same issue: base.js, cmsmain.js, error-404.html and leftandmain.js are located in the 'assets'-folder. Can I simply remove these files (don't think so). Is it possible to move these files to another folder. Help is appreciated as this is confusing to end-users.

    Many thanks in advance!

  • pingu
    Avatar
    Community Member
    75 Posts

    Re: Javascript files in Assets folder Link to this post

    Hi,

    Is there a resolution to this??

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Javascript files in Assets folder Link to this post

    ...was decided to put them in the assets folder though

    Because assets is the only folder we require to be writable. Since those files are generated by the code, PHP needs write permission to where ever it gets written to - assets was the logically place as we already require that to be writable.

    Can I simply remove these files (don't think so)

    No they will just be recreated next time you run it. The 404 page is generated as a static html page so it can be thrown without hitting the database

    Is there a resolution to this??

    You can if you need disable the combining of files by setting Requirements::set_combined_files_enabled(false); in your config file but the 404 page will still be generated in this folder

    1525 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.