This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Feed RSS

Feed RSS

Feed RSS

Friday 13 March 2015 4:28:54 pm - 7 replies


I want to use Syndication module of eZ. For exemple i create a module /rss/feed/news, but if i test the url i have :

The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL

I enable anonymous right for rss/feed and  i use this in my security.yml, but nothing. 

- { path: ^/rss/feed/news$, role: IS_AUTHENTICATED_ANONYMOUSLY }

I have no idea sad.gif Emoticon


Modified on Friday 13 March 2015 4:30:10 pm by Johann Roc

Saturday 14 March 2015 10:29:32 am

You should not have to customize the firewall. The rss module is a legacy one, and it should pass the firewall just fine.

I'm rather thinking that an error is occuring in the legacy module, and it shows up as a Token Error. Is there anything in particular in ezpublish_legacy/var/log/error.log ?

Monday 23 March 2015 3:10:40 pm

Thanks for your help. In fact i use a router to have 404 custom template :
It's this fonction that generate my error : 

$URLAlias = $this->getRepository()->getURLAliasService()->lookup(                    $RequestPathInfo = $request->attributes->get(                        'semanticPathinfo', $request->getPathInfo()                    )

Modified on Monday 23 March 2015 3:12:25 pm by Johann Roc

Monday 23 March 2015 3:24:56 pm

Adding to what Bertrand says, do you really need a custom site router for this? 

Modified on Monday 23 March 2015 3:25:21 pm by Carlos Revillo

Monday 23 March 2015 3:59:25 pm

I want to have a custom template for 404 Pages. This gist is the only solution i found. Have you another idea ?




Monday 23 March 2015 4:54:23 pm

I guess you're still using legacy code for some parts of your site, right?. Bertrand and me were talking about this. AFAIK, 404 errors are handled by legacy kernel. If i'm not wrong, symfony stack tries to match the request. If it doesn't found anything, legacy code takes control. If legacy doesn't find legacy error module takes the control and kernel/error/20.tpl is used somewhere. 

So, in brief, to have custom 404 error page you still need to create your kernel/error/20.tpl template. The good part is thanks to this cool project made by our friends at Netgen, you can include twig templates from tpl ones. with this approach my 20.tpl template looks now like 

from that 404.html.twig i can extend pagelayout.html.twig or adding controllers. 

Monday 23 March 2015 6:48:59 pm

Hi Johann,

If you have the correct priority setting for the router, then it should fall between the Symfony stack and legacy stack routers.

That being said, the part of the code you are having an issue with can effectively be removed. In other words, you can remove the try/catch part of the matchRequest as it should be a duplication of the Symfony stack router matchRequest function.

I initially did this duplication in case I required the exception object which was thrown. Removing the duplicated lookup should simply allow the legacy module check to run end then exist out to be processed by the legacy stack.

Michael O'Connor

Wednesday 25 March 2015 8:57:19 am

Thank you, i follow your advice and it's ok happy.gif Emoticon


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from