在生产中使用Symfony2保存缓存后找不到路由

时间:2015-03-01 15:00:56

标签: php symfony

我在Symfony网站上添加了一个包含新路线的简单页面。在它运行良好之前但从那时起我的所有页面都会在一段时间后发送到404错误,除了我的主页...当我删除缓存时它很好但很少有时间它再次开始在页面上出现错误。 ..

我不知道是什么问题,这里是我添加的新页面的文件:

{#info.html.twig author: Nicolas Le Roux #}

<!DOCTYPE html>
<html lang="fr">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-ico" href="web/favicon.ico" />
    <title>BibliShare - Les 8 étapes indispensables pour faire une bonne recherche bibliographique.</title>
    <meta name="description" content="Le guide essentiel pour effectuer des recherches bibliographiques efficaces en 8 étapes." />
    <link href="{{ asset('css/global.css') }}" rel="stylesheet">
    <link href="{{ asset('css/info.css') }}" rel="stylesheet">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="{{ asset('css/bootstrap.css') }}" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
    <body>
    <div class="container">
        <div class="row">
    <header class="row"> 
            <div class="col-lg-offset-2 col-lg-8 col-lg-offset-2">
                <div class="bs">
                    <a href="{{ path('biblishare_index') }}" title="BibliShare"><img src="{{ asset('css/img/biblishare.png') }}" /></a>
                </div>
            </div>
    </header>
            <div class="col-lg-12 middle text-center">
                <p>
                   <map name="map_info" id="id_map">
                      <area shape="rect" coords="200,1359,400,1375" href="http://www.sciencespo.fr/bibliotheque/fr" alt="Bibliothèque de Sciences Po" target="_blank" />
                      <area shape="rect" coords="203,1391,313,1410" href="http://www.scholar.google.com/" alt="Google Scholar" target="_blank" />
                      <area shape="rect" coords="204,1426,248,1443" href="http://www.cairn.info/" alt="Cairn" target="_blank" />
                      <area shape="rect" coords="203,1444,247,1463" href="http://www.jstor.org/" alt="Jstor" target="_blank" />
                      <area shape="rect" coords="205,1478,256,1494" href="http://www.persee.fr/" alt="Persée" target="_blank" />
                      <area shape="rect" coords="202,1542,423,1561" href="http://www.biblishare.com/" alt="BibliShare" title="BibliShare" target="_blank" />
                      <area shape="rect" coords="319,3055,556,3072" href="http://grebib.bnf.fr/html/presenter_bibliographie.html" alt="Normes de présentations" target="_blank" />
                      <area shape="rect" coords="203,3091,254,3108" href="https://www.zotero.org/" alt="Zotero" target="_blank" />
                      <area shape="rect" coords="274,3094,342,3108" href="http://www.mendeley.com/" alt="Mendeley" target="_blank" />
                      <area shape="rect" coords="545,3091,610,3108" href="http://www.worldcat.org/?lang=fr" alt="WorldCat" target="_blank" />
                   </map>

                </p>
                <img src="{{ asset('css/img/infographie.png') }}" alt="le guide pour vos recherches bibliographiques" usemap="#map_info" width="800" height="3198"/>
            </div>
        </div>
            <div class="col-lg-12 middle text-center">
                <div class="twitter-share-button2"><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.biblishare.com/info" data-via="BibliShare" data-size="large" data-count="none">Tweet</a></div>
                <div class="fb-share-button" data-href="http://www.biblishare.com/info" data-layout="button"></div>
            </div>
    <footer>
        <a href="{{ path('biblishare_index') }}" alt="Faire une recherche sur BibliShare">www.biblishare.com</a>
    </footer>
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.0";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          ga('create', 'UA-54997972-4', 'auto');
          ga('send', 'pageview');

        </script>
    </body>
</html>

路由文件:

biblishare_index:
    path:     /
    defaults: { _controller: BiblishareBundle:Default:index }

biblishare_select:
    path:     /select/
    defaults: { _controller: BiblishareBundle:Default:select }

biblishare_validation:
    path:     /validation
    defaults: { _controller: BiblishareBundle:Default:validation }

biblishare_add:
    path:    /add
    defaults: { _controller: BiblishareBundle:Default:member }

biblishare_profile:
    path:    /profile
    defaults: { _controller: BiblishareBundle:Profile:show }

biblishare_biblio:
    path:    /profile/{queryId}
    defaults: { _controller: BiblishareBundle:Profile:biblio }

biblishare_best:
    path:    /best
    defaults: { _controller: BiblishareBundle:Default:best }

biblishare_info:
    path:    /info
    defaults: { _controller: BiblishareBundle:Default:info }

target_route:
    path:     /select
    defaults: { _controller: BiblishareBundle:Default:select }

感谢您的帮助,我在OVH服务器。

0 个答案:

没有答案