[英]Symfony No route found for GET /undefined
I have a little problem, i put my symfony website online yesterday, every thing works fine but i got a random problem. 我有一个小问题,我昨天将我的symfony网站上线了,一切正常,但是我遇到了一个随机问题。 Everytime i click on the button to go back one page i got the error: "No route found for GET /undefined" This error also pop randomly when i click on links on my website. 每次我单击按钮返回上一页时,都会收到错误消息:“找不到GET / undefined路由”当我单击网站上的链接时,也会随机弹出此错误。
Thank you for your help. 谢谢您的帮助。
First problem: 第一个问题:
You need to have links with this pattern " Projets-Personnels " instead of "Projets Personnels". 您需要具有这种模式“ Projets-Personnels ”的链接,而不是“ Projets人员”。 That's what we call a "slug" 这就是我们所说的“ sl”
Install doctrine extension sluggable so Doctrine auto create the slug for you. 安装主义扩展sluggable所以学说自动创建蛞蝓你。
https://symfony.com/doc/master/bundles/StofDoctrineExtensionsBundle/index.html https://symfony.com/doc/master/bundles/StofDoctrineExtensionsBundle/index.html
When you will have this doctrine extension installed you will create your link like this: 安装了该学说扩展后,您将创建如下链接:
{% for item in categories %}
<h2 class="lp-title"> {{ item.slug}} </h2>
{% endfor %}
Second problem: 第二个问题:
About your backspace bug on firefox on Ubuntu: 关于Ubuntu上firefox的退格错误:
You need to enable the backspace if you use Firefoxe in Ubuntu. 如果在Ubuntu中使用Firefoxe,则需要启用退格键。
Go to the bar url of your firefox browser and execute this adress about:config
转到您的firefox浏览器的栏网址,然后执行以下about:config
地址
Firefox will show an avertissement message it's normal. Firefox会显示正常的广告讯息。 Click ok. 单击确定。 Then you need to change the value for browser:backspace_action
from 2 to 0 然后,您需要将browser:backspace_action
的值从2更改为0
I have tested this solution on Firefox Ubuntu and it works fine. 我已经在Firefox Ubuntu上测试了此解决方案,并且效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.