Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6857767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:04:11+00:00 2026-05-27T02:04:11+00:00

OLD QUESTION, SEE BELOW FOR THE UPDATED VERSION My development environment is not the

  • 0

OLD QUESTION, SEE BELOW FOR THE UPDATED VERSION

My development environment is not the fastest. I takes roughly 500ms per PHP request. It’s starting to become a problem with Symfony2 resource files because each of the resource files are being requested via Symfony’s internal controllers:

http://localhost/myproj/app_dev.php/js/bb8690a_part_4_myJavaScriptFile_2.js

As can be seen, the files are loaded via the Symfony framework and not directly. Since I’m starting to have over 20 files to load, multiplying that with the 500ms makes page loads very slow. I want to load the files directly, but I am not sure how to do that.

This is part of the config.yml:

# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    # java: /usr/bin/java
    filters:
        cssrewrite: ~

I thought setting use_controller to false would do it, but nope.

Is there a way to handle the loading of those resoures directly?

UPDATE:

This is the URL it tries to use now:

http://localhost/myproj/_controller/js/bb8690a_part_4_myJavaScriptFile_2.js

I have set use_controller to false for both dev and general configs. How do I get rid of that _controller part of the URL?

Edit: If I clear the cache, run assetic:dump and have use_controller as false, then upon reload I get Cannot load resource ".". I can’t get around that problem unless I temporarily enable use_controller for one page load. After that, I disable it and reload and now it requests from that invalid URL that contains _controller.

It also seems to work in prod, but not in dev. Strange.

Template code:

{% stylesheets filter="cssrewrite"
            'bundles/outotecofil/css/reset.css'
            'bundles/outotecofil/css/*'

            output='css/dist/dist.css'
        %}
        <link rel="stylesheet" href="{{ asset_url }}" />
        {% endstylesheets %}

        {% javascripts
            '@OutotecCommonBundle/Resources/public/js/jquery-1.6.2.min.js'
            '@OutotecCommonBundle/Resources/public/js/jquery-ui-1.8.16.custom.min.js'
            '@OutotecCommonBundle/Resources/public/js/chosen.jquery.min.js'
            '@OutotecCommonBundle/Resources/public/js/widget/*'

            '@OutotecOFILBundle/Resources/public/js/OFILDependencyManager.js'
            '@OutotecOFILBundle/Resources/public/js/widget/*'
            '@OutotecOFILBundle/Resources/public/js/plant-scope.js'

            output='js/dist/dist.js'
        %}
        <script src="{{ asset_url }}"></script>
        {% endjavascripts %}

To be extremely clear: without app_dev.php (i.e. in prod mode), it works. Only in dev it does not and throws this “Cannot load resource “.”” error unless I first enable use_controller for one request, after which I can disable it and reload though the URLs will then contain _controller/ in their paths.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:04:12+00:00Added an answer on May 27, 2026 at 2:04 am

    Try to remove this part of code in routing_dev.yml when use_controller is false :

    _assetic:
        resource: .
        type:     assetic
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Keeping the old question. See below for resolution. It is probably something simple, but
Note: This question refers to a very old version of jQuery.validate() (version 1.5). This
This is an age-old question, but I'm still having trouble with it. You see,
Update2 Please see my answer to my question. Update So, I updated the code
Old question My understanding is that C# has in some sense HashSet and set
Age old question! When you have finished developing and testing your ASP.Net web application,
The age old question. Where should you put your business logic, in the database
This might be a old question: Why does IEnumerable<T> inherit from IEnumerable ? This
I found this question in an old question in your website so i thought
(This question is over 6 years old and probably no longer has any relevance.)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.