Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [SF2][Symfony][Symfony2] Oops! An Error Occured
damianooo
post 24.01.2018, 23:20:41
Post #1





Grupa: Zarejestrowani
Postów: 493
Pomógł: 2
Dołączył: 15.07.2011
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Na środowisku produkcyjnym na głównej stronie logowania pojawia mi się komunikat Oops! An Eror Occured ?
Na środowisku DEV nie mam tego problemu.

Jeśli dobrze to rozumiem to w zależności od środowiska kolejność ładowania jest taka (np dla środowiska PROD):
a) config_prod.yml
b ) config.yml
c) routing.yml.

Jest jeszcze plik routing_dev.yml , ale nie ma za to pliku routing_prod.yml.
Utworzyłem plik routing_prod.yml ale niestety nie jest ładowany.

Jak na środowisku prod powinien być ustawiany routing ?

Tak mam obecnie:

plik routing.yml:

  1. app:
  2. resource: "@AppBundle/Controller/"
  3. type: annotation


plik routing_dev.yml:

  1. _wdt:
  2. resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
  3. prefix: /_wdt
  4.  
  5. _profiler:
  6. resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
  7. prefix: /_profiler
  8.  
  9. _errors:
  10. resource: "@TwigBundle/Resources/config/routing/errors.xml"
  11. prefix: /_error
  12.  
  13. _main:
  14. resource: routing.yml
  15.  
  16. _check_path:
  17. path: /login-check
  18.  
  19. _logout:
  20. path: /logout


Ten post edytował damianooo 25.01.2018, 08:17:42
Go to the top of the page
+Quote Post
nospor
post 25.01.2018, 09:32:05
Post #2





Grupa: Moderatorzy
Postów: 36 440
Pomógł: 6290
Dołączył: 27.12.2004




No ale co mowia logi na temat bledu?


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
damianooo
post 25.01.2018, 17:17:59
Post #3





Grupa: Zarejestrowani
Postów: 493
Pomógł: 2
Dołączył: 15.07.2011
Skąd: Katowice

Ostrzeżenie: (0%)
-----


w logach mam tak jak poniżej.
Wychodzi na to że nie widzi tych ścieżek tylko pytanie dlaczego ?
Czy routingi z routing_dev.yml powinienem przekopiować do routing.yml ?
Jak środowisko produkcyjne wie o nowych ścieżkach ?


  1. [2018-01-25 17:14:31] request.INFO: Matched route "liga_typerow_login". {"route_parameters":{"_controller":"AppBundle\\Controller\\SecurityController::loginAction","_route":"liga_typerow_login"},"request_uri":"http://o10.pl/login"} []
  2.  
  3. [2018-01-25 17:14:31] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
  4.  
  5. [2018-01-25 17:14:31] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "_check_path" as such route does not exist.") in "/home/dcpl/domains/o10.pl/app/Resources/AppBundle/views/Security/login.html.twig" at line 10." at /home/dcpl/domains/o10.pl/vendor/twig/twig/lib/Twig/Template.php line 218 {"exception":"[object] (Twig_Error_Runtime(code: 0): An exception has been thrown during the rendering of a template (\"Unable to generate a URL for the named route \"_check_path\" as such route does not exist.\") in \"/home/dcpl/domains/o10.pl/app/Resources/AppBundle/views/Security/login.html.twig\" at line 10. at /home/dcpl/domains/o10.pl/vendor/twig/twig/lib/Twig/Template.php:218, Symfony\\Component\\Routing\\Exception\\RouteNotFoundException(code: 0): Unable to generate a URL for the named route \"_check_path\" as such route does not exist. at /home/dcpl/domains/o10.pl/app/cache/prod/appProdProjectContainerUrlGenerator.php:82)"} []
Go to the top of the page
+Quote Post
Pyton_000
post 25.01.2018, 17:28:46
Post #4





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


Skoro produkcujne czyta z routing.yml a developerskie z routing_dev.yml to chyba logiczne jest że to co zdefiniujesz dev nie będzie idoczne na prod?
Go to the top of the page
+Quote Post
damianooo
post 25.01.2018, 17:51:16
Post #5





Grupa: Zarejestrowani
Postów: 493
Pomógł: 2
Dołączył: 15.07.2011
Skąd: Katowice

Ostrzeżenie: (0%)
-----


ok zrobiłem to wreszcie po Bożemu tzn. wrzuciłem to:

  1. _check_path:
  2. path: /login-check
  3.  
  4. _logout:
  5. path: /logout


do routing.yml

a resztę zostawiłem w routing_dev.yml

brawo ja.















Go to the top of the page
+Quote Post
Pyton_000
post 25.01.2018, 17:53:17
Post #6





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


Brawo Ty.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 29.03.2024 - 13:28