Giter Club home page Giter Club logo

Comments (23)

Spea avatar Spea commented on July 30, 2024

This is quite a confusing error, since this only happens when the bundle for a template is null.

I need some more information to help you there.

  • The complete stack trace of the error
  • The code from your action-Method
  • Your bower config
  • Your symfony config

Thanks in advance

from spbowerbundle.

davepowell avatar davepowell commented on July 30, 2024

We just ran into the same issue upgrading from Symfony 2.5.8 to 2.5.9. Reverting back to 2.5.8. cured the problem for us.

from spbowerbundle.

krzysztof-alboszta avatar krzysztof-alboszta commented on July 30, 2024

I've ran into the same issue after accidental upgrade to 2.5.9

from spbowerbundle.

Spea avatar Spea commented on July 30, 2024

I only tested this with 2.6.* will take a look into this.

from spbowerbundle.

Spea avatar Spea commented on July 30, 2024

I'm still not able to reproduce it. Please be so kind and post the following information:

  • The complete stack trace of the error
  • Your bower.json
  • Your symfony config
  • Your composer.json

from spbowerbundle.

krzysztof-alboszta avatar krzysztof-alboszta commented on July 30, 2024

I think It is related with this PR which was taken into the latest version of 2.3.24, 2.5.9 and the newest 2.6.* branches symfony/symfony#12894
as @stof mentioned in https://github.com/symfony/AsseticBundle/issues/331 there is fix for that in dev version of AsseticBundle
fix for that should be to use only bundle:folder:template.format.engine notation when including templates

from spbowerbundle.

Spea avatar Spea commented on July 30, 2024

Ah I see. Good to know I didn't broke something :)

from spbowerbundle.

krzysztof-alboszta avatar krzysztof-alboszta commented on July 30, 2024

in my case the problem was that I used correctly extending main template as
{% extend '::layout.html.twig' %}
but in that file (provided in app/Resources/views/) i had this code:
{% extends app.user ? "base_secure.html.twig" : "base.html.twig" %}
It works before, now It require to have the bundle notation like
{% extends app.user ? "::base_secure.html.twig" : "::base.html.twig" %}

@davepowell check your code for similar usage

from spbowerbundle.

evheniy avatar evheniy commented on July 30, 2024

The same problem after updating from 2.5 to 2.6.3
app/console twig:lint src

{% block javascripts %}
    {{ parent() }}
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script>
    {% javascripts
    '@WorkDefaultBundle/Resources/public/js/chat_client.js'
    filter='uglifyjs2' %}
    <script src="{{ static_img_url }}{{ asset_url }}"></script>
    {% endjavascripts %}
{% endblock %}


# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    globals:
        static_img_url: %static_img_url%

# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    bundles:        [ WorkDefaultBundle, WorkMobileBundle, TwigBundle ]
    filters:
        uglifyjs2:
            bin: /usr/local/bin/uglifyjs
        uglifycss:
            bin: /usr/local/bin/uglifycss

from spbowerbundle.

krzysztof-alboszta avatar krzysztof-alboszta commented on July 30, 2024

I think for the {% javascripts %} tag (and perhaps for {% stylesheets %}) the only solution is to take the dev version of symfony/assetic bundle (composer require symfony/assetic-bundle:~2.5-dev) as the change that fix this issue is not yet merged into stable version

from spbowerbundle.

evheniy avatar evheniy commented on July 30, 2024

Great. Thank you. It works. (and for stylesheets too)

from spbowerbundle.

sonu27 avatar sonu27 commented on July 30, 2024

Thank you! Hopefully they merge it in stable soon.

from spbowerbundle.

karser avatar karser commented on July 30, 2024

Same issue when update 2.6.1 => 2.6.3
workaround is

"symfony/symfony": "~2.6",
"symfony/assetic-bundle": "dev-master",

from spbowerbundle.

koflerdavid avatar koflerdavid commented on July 30, 2024

Just an observation. I ran into the same problem today (Symfony v2.3.34, Assetic v1.1.1, AsseticBundle v2.3.0), but "resolved" it by using the <Bundle>:<Folder>:<template> notation for referencing the template (in the controller) instead of @<Bundle>/<Folder>/<template> .

from spbowerbundle.

stof avatar stof commented on July 30, 2024

use the dev version of AsseticBundle (the master branch) to get the fixed version. I will release it this evening

from spbowerbundle.

ousmaneNdiaye avatar ousmaneNdiaye commented on July 30, 2024

I got the same error after uppgrading from 2.5.8 to 2.5.9, it appears in console when I try to use the translation:update command.
Using assetic dev-master version did not fix it (in addition using dev-master versions is considered as a critical violation according to sensio insight)

from spbowerbundle.

stof avatar stof commented on July 30, 2024

@ousmaneNdiaye AsseticBundle 2.6.0 and 2.6.1 have been released in the meantime

from spbowerbundle.

stof avatar stof commented on July 30, 2024

And I was talking about the AsseticBundle version, not the Assetic version

from spbowerbundle.

ousmaneNdiaye avatar ousmaneNdiaye commented on July 30, 2024

@stof ok Thank you I will check it out.

from spbowerbundle.

seb2411 avatar seb2411 commented on July 30, 2024

@stof, and for the 2.3.* branch ? There are some updates ?

from spbowerbundle.

stof avatar stof commented on July 30, 2024

@seb2411 no, because the 2.6 version of AsseticBundle is compatible with Symfony 2.3+ so I'm not maintaining multiple branches in parallel. People should just update to the latest version.

from spbowerbundle.

xammeil avatar xammeil commented on July 30, 2024

how to upgrade the symfony version

from spbowerbundle.

Spea avatar Spea commented on July 30, 2024

Since this issue is fixed, I'm going to close this ticket

from spbowerbundle.

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.