eZ Community » Forums » eZ Publish 5 Platform » Hello World Bundle
expandshrink

Hello World Bundle

Hello World Bundle

Tuesday 19 February 2013 8:38:54 am - 5 replies

Hi all,

I've been following the tutorial http://granitehorizon.com/Resources/About-eZ-Publish/Creating-Controllers-for-eZ-Publish-5-Platform in an attempt to make my first bundle for EZP5.

I've done everything as it says in this tutorial but when I load the url. I get the Module not found error.

You can see the result of if here http://daniel.clements.id.au/gh/hello/brandon/

I run php ezpublish/console route:debug and from that I receive the following

GHHelloWorldPlain ANY /gh/helloPlain/{name}/{another_name}/
GHHelloWorldPlain2 ANY /gh/helloPlain/{name}/
GHHelloWorld ANY /gh/hello/{name}/{another_name}/
GHHelloWorld2 ANY /gh/hello/{name}/
I then tested the route using php ezpublish/console route:match /gh/hello/brandon and receive:

None of the routes matches

But if I test the route using php ezpublish/console route:match /gh/hello/brandon/ I receive:

Route "GHHelloWorld2" matches

Though when I load http://daniel.clements.id.au/gh/hello/brandon/ I get Module not found.

Is there something simple that I am missing here?

I have also looked over this tutorial http://www.ymc.ch/en/hands-on-ez-publish-5-the-first-symfony-2-bundle-en but it seems to be have been done in the alpha version of EZP5 so I'm not sure if I should pay attention to it.

Thanks for any help you can offer.

Tuesday 19 February 2013 4:58:19 pm

Hi Daniel,

Maybe you should read this post : http://share.ez.no/forums/ez-publish-5-platform/public-api-cookbook

It's maybe the same issue resolved by Bertrand Dugonier.

Tuesday 19 February 2013 11:52:28 pm

Hi Jeremy,

Thanks for the reply but that issue hasn't fixed my problem.

I have the route in ezpublish/config/routing.yml already

I attempted to place the _ at the beginning of my route file but that hasn't worked either.

My routing file is below. You will notice 2 routes that I've made. Both of which don't seem to be recognised.

As mentioned before when i test the routes from the CLI i get matches. Seems strange to me.

 eZDemoBundle:    
resource: "@eZDemoBundle/Resources/config/routing.yml"
 
_ezpublishRoutes:    
resource: "@EzPublishCoreBundle/Resources/config/routing/internal.yml"
 
_ezpublishLegacyRoutes:    
resource: "@EzPublishLegacyBundle/Resources/config/routing.yml"
 
_ezpublishRestRoutes:    
resource: "@EzPublishRestBundle/Resources/config/routing.yml"    
prefix:   /api/ezp/v2
 
_internal:    resource: "@FrameworkBundle/Resources/config/routing/internal.xml"    
prefix:   /_internal
 
DCLiveSite:    
resource: "@DCLiveSite/Resources/config/routing.yml"    
 
GHTutorialBundle:     
resource: "@GHTutorialBundle/Resources/config/routing.yml"

Wednesday 20 February 2013 12:06:50 am

Could you try running

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

and then test it again?

Wednesday 20 February 2013 1:32:48 am

Hi Shoaib,

That seems to have solved my issue.

I was running php ezpublish/console cache:clear and thought that was doing both production and development.

Thanks for the help guys!! Now to work out theming! big-smile.gif Emoticon

Friday 06 September 2013 12:57:11 pm

Hi all, I'm newbie.

Could you help me please to resolve my problem in this topic : http://share.ez.no/forums/general/call-a-php-function-in-my-template

It's about my first module, a kind of echo "hello ez world !"

Thanks in advance.

C B.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from