ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problems loading Script Templates

March 04, 2012 8:33am

Subscribe [2]
  • #1 / Mar 04, 2012 8:33am

    Scott Harrington

    85 posts

    Hi, Im having problems with some of my script files. I have always created my .js files within a template group directly in EE, titled js.

    I have also recently discovered that I wasnt using the EE supported .htaccess version for removing the index.php from the URLs, which I recently switched to.

    Since then, my modernizr isnt being called in at all…just blank.

    I used to use this method (removed s from script callup):-

    <cript src="{site_url}index.php/js/modernizr-1.7.min"></cript>

    Im assuming the .htaccess is the problem as worked fine before?

    If someone could help, that’d be great - Im guessing is because my js files are within a template group, which is a personal preference and the removal of the index.php is the root of the problem.

    Tried many alternatives but to no avail ;(

  • #2 / Mar 05, 2012 12:41am

    Cheif

    626 posts

    I realise it doesn’t help you but as I’ve mentioned many times B4 - using the EE CSS/JS templating systems is fraught with danger and rarely ends well.

    If you make it/leave it as a proper file and reference it via a proper path you’ll be loving life, making less database calls and investing more time in making your sites work better.

    .htaccess is a cruel master, relative paths are the blade that helps to set you free

    Sorry I couldn’t be more helpful.

  • #3 / Mar 05, 2012 4:12am

    Scott Harrington

    85 posts

    Hi, managed to sort this….fresh pair of eyes was the solution.

  • #4 / Mar 05, 2012 12:54pm

    Shane Eckert

    7174 posts

    Hello Scott Harrington,

    I am glad to hear that a fresh pair of eyes helped solve things for you. How true this is.

    If you need anything else, you know where to find us!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases