【问题标题】:Internal page redirection in Symfony/SonataSymfony/Sonata 中的内部页面重定向
【发布时间】:2017-03-19 05:59:25
【问题描述】:

我正在尝试使用我的奏鸣曲沙盒。

当我尝试重新加载配置文件或注册路由时遇到此消息internal page redirection 的问题。

【问题讨论】:

  • 欢迎来到 Stackoverflow @safe。您越容易让我们帮助您,您获得答案的机会就越大。包括一些代码 sn-p,例如错误堆栈跟踪。
  • 如果您已经找到解决方案,为什么还没有发布?

标签: symfony symfony-2.1 sonata sonata-media-bundle


【解决方案1】:

内部页面重定向仅供管理员使用。

如果你想删除它去

PageBundle/Listner/ResponseListener.php

并删除它

// 在重定向之前显示一个验证页面,以便编辑器可以编辑当前页面 if ($page && $response->isRedirection() && $this->cmsSelector->isEditor() && !$request->get('_sonata_page_skip')) { $response = new Response($this->template->render('SonataPageBundle:Page:redirect.html.twig', array( '响应' => $响应, '页面' => $页面, ))); $response->setPrivate(); $event->setResponse($response); 返回; }

【讨论】:

  • Listner 目录应该是Listener吗?
【解决方案2】:

由于此捆绑包已更新,现在有一个参数可以设置为跳过或不跳过:

sonata.page.skip_redirection: true

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-14
    • 1970-01-01
    • 2013-09-05
    • 1970-01-01
    • 2017-04-27
    • 2011-04-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多