Symfony bundle Twig auto namespace not registered?registering Bundle to symfony kernelSpecify alternative fallback paths for Symfony to find twig templates for bundlestwig_js bundle with Symfony 2.3How to make Assetic work with resources defined with Twig namespaces?Autoload Bundle with custom path in Symfony2Symfony bundle inheritance and twig templates overridingSymfony assets relative to bundleSymfony - FOS UserBundle Error: “Attempted to load class 'User' from namespace…” by opening the /register PageSymfony: Namespaced bundle not loaded correctlySymfony 3.4 Use view inside my bundle

Can a Resident Assistant be told to ignore a lawful order?'

What details should I consider before agreeing for part of my salary to be 'retained' by employer?

Pi 3 B+ no audio device found

Does the Intel 8085 CPU use real memory addresses?

What were the problems on the Apollo 11 lunar module?

Vienna To Graz By Rail

What "fuel more powerful than anything the West (had) in stock" put Laika in orbit aboard Sputnik 2?

Coverting list of string into integers and reshaping the original list

Is this artwork (used in a video game) real?

How to honestly answer questions from a girlfriend like "How did you find this place" without giving the impression I'm always talking about my exes?

Where do the electrons come from to make the carbon stable during bombardment of alpha particles on beryllium

How should one refer to knights (& dames) in academic writing?

My credit card has no magnetic stripe. Is this a problem in the USA?

How to remove the first colon ':' from a timestamp?

ROT13 encoder/decoder

How would you say "Sorry, that was a mistake on my part"?

Wordplay subtraction paradox

Creating lines connecting each possible pair of points in PostGIS?

Why does pip3 install in ~/.local on Debian?

Playing saxophone without using the octave key

Is the purpose of sheet music to be played along to? Or a guide for learning and reference during playing?

Credit card details stolen every 1-2 years. What am I doing wrong?

Is passive Investigation essentially truesight against illusions?

How to find abandoned railways in Google Maps?



Symfony bundle Twig auto namespace not registered?


registering Bundle to symfony kernelSpecify alternative fallback paths for Symfony to find twig templates for bundlestwig_js bundle with Symfony 2.3How to make Assetic work with resources defined with Twig namespaces?Autoload Bundle with custom path in Symfony2Symfony bundle inheritance and twig templates overridingSymfony assets relative to bundleSymfony - FOS UserBundle Error: “Attempted to load class 'User' from namespace…” by opening the /register PageSymfony: Namespaced bundle not loaded correctlySymfony 3.4 Use view inside my bundle






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have an "AppBundle" in my Symfony ( 3.4 ) Project and everthing is running fine in dev, but when deployed on production Server, I get following error:



There are no registered paths for namespace "App".


I use the twig namespace notation @Appdirtemplatefile that should automatically be registered according to the docs. When I run console debug:twig I can see that there is no @App twig namespace registered.
Suprisingly, I have a second Bundle called PackagingBundle, and the namespace Packaging of that bundle is well registered.



How can this be ? Where are those namespaces defined ? Is there a file for that that I could modify ?










share|improve this question




























    1















    I have an "AppBundle" in my Symfony ( 3.4 ) Project and everthing is running fine in dev, but when deployed on production Server, I get following error:



    There are no registered paths for namespace "App".


    I use the twig namespace notation @Appdirtemplatefile that should automatically be registered according to the docs. When I run console debug:twig I can see that there is no @App twig namespace registered.
    Suprisingly, I have a second Bundle called PackagingBundle, and the namespace Packaging of that bundle is well registered.



    How can this be ? Where are those namespaces defined ? Is there a file for that that I could modify ?










    share|improve this question
























      1












      1








      1








      I have an "AppBundle" in my Symfony ( 3.4 ) Project and everthing is running fine in dev, but when deployed on production Server, I get following error:



      There are no registered paths for namespace "App".


      I use the twig namespace notation @Appdirtemplatefile that should automatically be registered according to the docs. When I run console debug:twig I can see that there is no @App twig namespace registered.
      Suprisingly, I have a second Bundle called PackagingBundle, and the namespace Packaging of that bundle is well registered.



      How can this be ? Where are those namespaces defined ? Is there a file for that that I could modify ?










      share|improve this question














      I have an "AppBundle" in my Symfony ( 3.4 ) Project and everthing is running fine in dev, but when deployed on production Server, I get following error:



      There are no registered paths for namespace "App".


      I use the twig namespace notation @Appdirtemplatefile that should automatically be registered according to the docs. When I run console debug:twig I can see that there is no @App twig namespace registered.
      Suprisingly, I have a second Bundle called PackagingBundle, and the namespace Packaging of that bundle is well registered.



      How can this be ? Where are those namespaces defined ? Is there a file for that that I could modify ?







      symfony twig






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 9:17









      minychillominychillo

      2402 silver badges10 bronze badges




      2402 silver badges10 bronze badges






















          2 Answers
          2






          active

          oldest

          votes


















          0














          You have to set this in the composer.json by setting autoloader path:



           "autoload": 
          "psr-4":
          "App\": "src/"

          ,


          But for Bundles, in SF4 you have to set in the file config/bundles.php.






          share|improve this answer

























          • Mine is like this .. wrong ?: "autoload": { "psr-4": "AppBundle\": "src/AppBundle", "PackagingBundle\": "src/PackagingBundle", , ... it does work on dev AND for the PackagingBundle ? But I will give it a try ..

            – minychillo
            Mar 26 at 10:59












          • yes, there's really no namespace for 'App', but for 'AppBundle\', yes

            – hoover_D
            Mar 26 at 11:01











          • But how come it works for Packaging and on dev ? Anyway, thank you, will give it a try ..

            – minychillo
            Mar 26 at 11:01











          • is this error about Twig? did you do a bin/console debug:twig ?

            – hoover_D
            Mar 26 at 11:06











          • doa composer dump-autoload

            – hoover_D
            Mar 26 at 11:09


















          0














          My mistake was that I named the views folder in my AppBundle Views , with uppercase "V". I don't know why it worked on dev server and not on prod, that is just one of those mysteries.



          Anyway, a stupid mistake that coast me a lot of time, so maybe this post can help someone save some time.






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353467%2fsymfony-bundle-twig-auto-namespace-not-registered%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You have to set this in the composer.json by setting autoloader path:



             "autoload": 
            "psr-4":
            "App\": "src/"

            ,


            But for Bundles, in SF4 you have to set in the file config/bundles.php.






            share|improve this answer

























            • Mine is like this .. wrong ?: "autoload": { "psr-4": "AppBundle\": "src/AppBundle", "PackagingBundle\": "src/PackagingBundle", , ... it does work on dev AND for the PackagingBundle ? But I will give it a try ..

              – minychillo
              Mar 26 at 10:59












            • yes, there's really no namespace for 'App', but for 'AppBundle\', yes

              – hoover_D
              Mar 26 at 11:01











            • But how come it works for Packaging and on dev ? Anyway, thank you, will give it a try ..

              – minychillo
              Mar 26 at 11:01











            • is this error about Twig? did you do a bin/console debug:twig ?

              – hoover_D
              Mar 26 at 11:06











            • doa composer dump-autoload

              – hoover_D
              Mar 26 at 11:09















            0














            You have to set this in the composer.json by setting autoloader path:



             "autoload": 
            "psr-4":
            "App\": "src/"

            ,


            But for Bundles, in SF4 you have to set in the file config/bundles.php.






            share|improve this answer

























            • Mine is like this .. wrong ?: "autoload": { "psr-4": "AppBundle\": "src/AppBundle", "PackagingBundle\": "src/PackagingBundle", , ... it does work on dev AND for the PackagingBundle ? But I will give it a try ..

              – minychillo
              Mar 26 at 10:59












            • yes, there's really no namespace for 'App', but for 'AppBundle\', yes

              – hoover_D
              Mar 26 at 11:01











            • But how come it works for Packaging and on dev ? Anyway, thank you, will give it a try ..

              – minychillo
              Mar 26 at 11:01











            • is this error about Twig? did you do a bin/console debug:twig ?

              – hoover_D
              Mar 26 at 11:06











            • doa composer dump-autoload

              – hoover_D
              Mar 26 at 11:09













            0












            0








            0







            You have to set this in the composer.json by setting autoloader path:



             "autoload": 
            "psr-4":
            "App\": "src/"

            ,


            But for Bundles, in SF4 you have to set in the file config/bundles.php.






            share|improve this answer















            You have to set this in the composer.json by setting autoloader path:



             "autoload": 
            "psr-4":
            "App\": "src/"

            ,


            But for Bundles, in SF4 you have to set in the file config/bundles.php.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 26 at 11:00

























            answered Mar 26 at 10:57









            hoover_Dhoover_D

            3901 silver badge7 bronze badges




            3901 silver badge7 bronze badges












            • Mine is like this .. wrong ?: "autoload": { "psr-4": "AppBundle\": "src/AppBundle", "PackagingBundle\": "src/PackagingBundle", , ... it does work on dev AND for the PackagingBundle ? But I will give it a try ..

              – minychillo
              Mar 26 at 10:59












            • yes, there's really no namespace for 'App', but for 'AppBundle\', yes

              – hoover_D
              Mar 26 at 11:01











            • But how come it works for Packaging and on dev ? Anyway, thank you, will give it a try ..

              – minychillo
              Mar 26 at 11:01











            • is this error about Twig? did you do a bin/console debug:twig ?

              – hoover_D
              Mar 26 at 11:06











            • doa composer dump-autoload

              – hoover_D
              Mar 26 at 11:09

















            • Mine is like this .. wrong ?: "autoload": { "psr-4": "AppBundle\": "src/AppBundle", "PackagingBundle\": "src/PackagingBundle", , ... it does work on dev AND for the PackagingBundle ? But I will give it a try ..

              – minychillo
              Mar 26 at 10:59












            • yes, there's really no namespace for 'App', but for 'AppBundle\', yes

              – hoover_D
              Mar 26 at 11:01











            • But how come it works for Packaging and on dev ? Anyway, thank you, will give it a try ..

              – minychillo
              Mar 26 at 11:01











            • is this error about Twig? did you do a bin/console debug:twig ?

              – hoover_D
              Mar 26 at 11:06











            • doa composer dump-autoload

              – hoover_D
              Mar 26 at 11:09
















            Mine is like this .. wrong ?: "autoload": { "psr-4": "AppBundle\": "src/AppBundle", "PackagingBundle\": "src/PackagingBundle", , ... it does work on dev AND for the PackagingBundle ? But I will give it a try ..

            – minychillo
            Mar 26 at 10:59






            Mine is like this .. wrong ?: "autoload": { "psr-4": "AppBundle\": "src/AppBundle", "PackagingBundle\": "src/PackagingBundle", , ... it does work on dev AND for the PackagingBundle ? But I will give it a try ..

            – minychillo
            Mar 26 at 10:59














            yes, there's really no namespace for 'App', but for 'AppBundle\', yes

            – hoover_D
            Mar 26 at 11:01





            yes, there's really no namespace for 'App', but for 'AppBundle\', yes

            – hoover_D
            Mar 26 at 11:01













            But how come it works for Packaging and on dev ? Anyway, thank you, will give it a try ..

            – minychillo
            Mar 26 at 11:01





            But how come it works for Packaging and on dev ? Anyway, thank you, will give it a try ..

            – minychillo
            Mar 26 at 11:01













            is this error about Twig? did you do a bin/console debug:twig ?

            – hoover_D
            Mar 26 at 11:06





            is this error about Twig? did you do a bin/console debug:twig ?

            – hoover_D
            Mar 26 at 11:06













            doa composer dump-autoload

            – hoover_D
            Mar 26 at 11:09





            doa composer dump-autoload

            – hoover_D
            Mar 26 at 11:09













            0














            My mistake was that I named the views folder in my AppBundle Views , with uppercase "V". I don't know why it worked on dev server and not on prod, that is just one of those mysteries.



            Anyway, a stupid mistake that coast me a lot of time, so maybe this post can help someone save some time.






            share|improve this answer



























              0














              My mistake was that I named the views folder in my AppBundle Views , with uppercase "V". I don't know why it worked on dev server and not on prod, that is just one of those mysteries.



              Anyway, a stupid mistake that coast me a lot of time, so maybe this post can help someone save some time.






              share|improve this answer

























                0












                0








                0







                My mistake was that I named the views folder in my AppBundle Views , with uppercase "V". I don't know why it worked on dev server and not on prod, that is just one of those mysteries.



                Anyway, a stupid mistake that coast me a lot of time, so maybe this post can help someone save some time.






                share|improve this answer













                My mistake was that I named the views folder in my AppBundle Views , with uppercase "V". I don't know why it worked on dev server and not on prod, that is just one of those mysteries.



                Anyway, a stupid mistake that coast me a lot of time, so maybe this post can help someone save some time.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 27 at 9:23









                minychillominychillo

                2402 silver badges10 bronze badges




                2402 silver badges10 bronze badges



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid …


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353467%2fsymfony-bundle-twig-auto-namespace-not-registered%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

                    Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?