Code Monkey home page Code Monkey logo

Comments (8)

docteurklein avatar docteurklein commented on June 2, 2024

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.

lsmith77 avatar lsmith77 commented on June 2, 2024

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.

docteurklein avatar docteurklein commented on June 2, 2024

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.

docteurklein avatar docteurklein commented on June 2, 2024

what you could do too is call the inner environment return $this->templating->getEnvironment()->loadTemplate($name); and get the exception.

from knpradbundle.

lsmith77 avatar lsmith77 commented on June 2, 2024

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.

docteurklein avatar docteurklein commented on June 2, 2024

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.

lsmith77 avatar lsmith77 commented on June 2, 2024

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.

docteurklein avatar docteurklein commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.