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 » Public API Cookbook

Public API Cookbook

Public API Cookbook

Sunday 17 February 2013 12:30:05 am - 9 replies

I tried to run the examples from

In routing.yml

I added the following details just for a test

ez_systems_cookbook_travel: pattern: /travel/{name} defaults: { _controller: EzSystemsCookbookBundle:Travel:index }

I have added a travel controller with indexAction function which accepts $name as a parameterWhen I try to run the website locally http://mypersonal.url/travel/testname
I get the following error:

Module not found

The requested module travel could not be found.

Possible reasons for this are: The module name was misspelled, try changing the URL.

The module does not exist on this site. This site uses siteaccess matching in the URL and you did not supply one, try inserting a siteaccess name before the module in the URL.

Normally problem like this in older version of EZPublish was related to anonymous user permission which does not looks to be the case in EZPublish5I as well did the clear cache from backend interface without any helpThanks in advance for any help.

Modified on Wednesday 20 February 2013 12:12:55 am by Shoaib Bagdadi

Sunday 17 February 2013 12:04:32 pm

Hmmm... this particular reply means that the request ended up handled by the legacy kernel. For some reason, it wasn't caught by the symfony router, and was ultimately handled as a URL alias, then as a legacy module.

But I get the same error with the built-in route, /cookbook/hello/{name}.

I'll look into this.

Sunday 17 February 2013 12:09:01 pm

Simple: by default, routing.yml from EzSystemsCookbookBundle isn't loaded. Edit ezpublish/config/routing.yml, and add this:

    resource: "@EzSystemsCookbookBundle/Resources/config/routing.yml"

Monday 18 February 2013 11:18:04 am

Thank you Bertrand

Wednesday 20 February 2013 12:09:36 am

There are 2 things clearly missing in the cookbook

You’ll want to make sure all caches are cleared by using:

cd /path/to/ezpublish5-root

php ezpublish/console cache:clear --env=prod

and then

cd ezpublish_legacy php bin/php/ezcache.php --clear-all --purge

Modified on Wednesday 20 February 2013 12:11:49 am by Shoaib Bagdadi

Wednesday 20 February 2013 10:17:43 am

Clearing the symfony cache should indeed be documented, but where do you think it would really apply in the cookbook itself ? Or do you think it is a general doc requirement we haven't met yet ?

About clearing legacy cache, I really really don't see where it would apply in the cookbook itself, since it fully focuses on the eZ Publish 5 API and doesn't use a single line of legacy code.

Wednesday 20 February 2013 12:54:24 pm

Bertrand you are right legacy cache should not be included in the cookbook.

I think it would be nice to add the following information to the cookbook
Edit ezpublish/config/routing.yml, and add this:
    resource: "@EzSystemsCookbookBundle/Resources/config/routing.yml"
and run the following command from console
php ezpublish/console cache:clear --env=prod

right before the paragraph Creating a command line script in your bundle
this would have saved some hours for me atleast happy.gif Emoticon

Wednesday 20 February 2013 4:14:24 pm

This makes much more sense.

To be frank, I think we should rather highlight that development should be made in dev mode blunk.gif Emoticon

But this is worth adding anyway.

Wednesday 20 February 2013 10:13:36 pm

How can I put the eZPublish5 project in dev mode?

Thursday 21 February 2013 10:27:11 am

You just need to use index_dev.php instead of index.php, Shaoib. You can get more information here:


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

36 542 Users on board!

Forums menu

Proudly Developed with from