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;
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
add a comment |
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
add a comment |
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
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
symfony twig
asked Mar 26 at 9:17
minychillominychillo
2402 silver badges10 bronze badges
2402 silver badges10 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
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
|
show 2 more comments
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
|
show 2 more comments
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.
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
|
show 2 more comments
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.
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.
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
|
show 2 more comments
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
|
show 2 more comments
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 27 at 9:23
minychillominychillo
2402 silver badges10 bronze badges
2402 silver badges10 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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