Comments (8)
yes, we already noticed this problem. I think it's coming from the not explicit exception thrown by twig. It's hard to know why the template rendering fails.
from knpradbundle.
I think we should just check in the missing view handler if the template exits or not .. and if it does .. then not present the form to create it .. but instead allow the normal exception to be thrown.
from knpradbundle.
for the moment, we use "templating" service and call ->exists()
, which itself asks twig environment to load
and check if it throws exception or not.
https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/TwigEngine.php#L80
https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/TwigEngine.php#L122
So no way to know the previous exception and deduce if it's either a twig syntax error / extends / or inexistent file
But maybe you're right, just testing if the local file exists based on it's logical name could work.
from knpradbundle.
what you could do too is call the inner environment return $this->templating->getEnvironment()->loadTemplate($name);
and get the exception.
from knpradbundle.
aehm .. i am a bit confused in regards to the branches .. this didnt go into 2.3 but only develop .. but it appears develop isnt 2.3 compatible ..?
from knpradbundle.
develop is 2.3 compatible. Starting from now, we merge develop into 2.3 as soon as it's stable.
So yes, once everything's ok in develop, we merge it into 2.3.
Is that ok for you ? If you have another way to handle the flow, I would be happy to hear it :)
from knpradbundle.
ok .. i was just irritated that develop does not rebase cleanly on 2.3. that being said .. maybe its better to remove the 2.3 branch for now so that people do not use it instead of develop?
from knpradbundle.
yes, indeed. I'm not sure about the best way of doing that 2.2 / 2.3 separation cleanly. I can delete 2.3 for the moment.
from knpradbundle.
Related Issues (20)
- ServiceCircularReferenceException HOT 8
- Docs fix: addParameter should be setParameter HOT 1
- Auto registration Twig extensions with arguments HOT 2
- Two Symfony version dependency
- Rewriting Behat tests HOT 16
- We need a new stable release HOT 8
- Impossible to use as "dev-master" dependency HOT 3
- Support for Auto-Registering Event Subscribers HOT 3
- array syntax used on rad.knplabs.com cannot be used with minimum rad-edition requirements HOT 1
- [RFC] it could load every yml file present in config/services folder HOT 6
- rename jquery-ujs. HOT 6
- add copyright headers on all files HOT 4
- twitter bootstrap 3? HOT 3
- createAccessDeniedException() must be public HOT 6
- The "flashes" twig tag should have access to parent scope variables HOT 2
- split KnpRadBundle into smaller components HOT 11
- port Metawidget to Symfony
- Symfony 2.7 support HOT 8
- Caching option for better performance
- Bundle is outdated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knpradbundle.