Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8421161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:04:18+00:00 2026-06-10T03:04:18+00:00

So far, my TwigBundle custom error404.html.twig page displays correctly on production mode when I

  • 0

So far, my “TwigBundle” custom error404.html.twig page displays correctly on production mode when I throw:

$this->createNotFoundException('whatevs');

However, when a “NotFoundHttpException” is thrown by Symfony (such as whenever a route is not found), the “no route found” page displays indeed on app_dev, mentioning “404 Not Found”, but on production mode it just displays a blank page…

Which does not seem normal since, according to the Symfony documentation: “The createNotFoundException() method creates a special NotFoundHttpException object, which ultimately triggers a 404 HTTP response inside Symfony.”

Then why don’t I get the same behavior? Is there something I am missing?

I am using the master branch.

EDIT: Here is my security.yml file, I am using FOSUserBundle and FOSFacebookBundle:

security:
providers:
    chain_provider:
        chain:
            providers: [fos_userbundle, my_fos_facebook_provider]
    fos_userbundle:
        id: fos_user.user_manager
    my_fos_facebook_provider:
        id: my.facebook.user

encoders:
    "FOS\UserBundle\Model\UserInterface": sha512

firewalls:
    public:
        pattern:   ^/
        fos_facebook:
            app_url: "http://apps.facebook.com/***/"
            server_url: "http://localhost/facebookApp/"
            login_path: /login
            check_path: /checkFb
            default_target_path: /
            provider: chain_provider
        form_login:
            login_path: /login
            check_path: /login_check
            provider: chain_provider
            remember_me:   true
            csrf_provider: form.csrf_provider
        remember_me:
            key:           %secret%
        anonymous: true
        logout: true
    login:                                           
        pattern:   ^/(login$|register|resetting)  
        anonymous: true

role_hierarchy:
    ROLE_ADMIN:       ROLE_ADMIN
    ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALOOW_TO_SWITCH]
    ROLE_USER:        ROLE_USER

access_control:
    - { path: ^/, role: [IS_AUTHENTICATED_ANONYMOUSLY] }
    - { path: ^/secured/, role: [IS_AUTHENTICATED_FULLY] } # This is the route secured with fos_facebook
    - { path: ^/facebook/,           role: [ROLE_FACEBOOK] }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:04:20+00:00Added an answer on June 10, 2026 at 3:04 am

    Had the same problem. See https://github.com/symfony/symfony/issues/5320 You’re probably calling is_granted on the errorpage or layout.html.twig. Read the answer of Stof how to solve this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As far as I can see this is not the case, however, I thought
so far, I have this: class Foo{ private $plugin_methods = array(); public function registerPlugin($caller,
So far I only found two ways: throw exception play nothing ad.2. Pretty recent
As far as I can tell this is perfectly valid batch-file code, just a
As far as I know, this isn't caused by an infinite recursion. The program
As far as I can tell, this is isn't possible, so I'm really just
So far.. I have this test string: Hello {John|Paul|Cindy}, hows {david}? and my expression
As far as I know, Google will index a page if it meets at
Do anyone know why this occurs? as far I can get, the child class
As far as I know this isn't possible. I would like to draw an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.