New package block not added

Permalink 1 user found helpful
Hello,

I'm new on C5.

I have create a package on concrete/packages/

My package contains the followings files:

- controller.php
- icon.png

A folder blocks that contains:
- add.php
- edit.php
- db.xml
- icon.png
- controller.php
- view.php

But my package don't appears i try the installation.

Could you help me please? Thanks

 
JohntheFish replied on at Permalink Reply
JohntheFish
The directory containing the block files should be

packagename/blocks/blockname/
VanNoctar replied on at Permalink Reply
Yes, excuse me, i've not give the correctly path for my files. It is:

packages/event_manager:
- controller.php
- icon.png
packages/event_manager/blocks/event_manager:
- add.php
- controller.php
- db.xml
- edit.php
- icon.png
- view.php

But the package not appear from package installations...
VanNoctar replied on at Permalink Reply
Okay, when i add the file CHANGELOG it work!

But now the follow message appears when i click on install

Warning: require_once(C:\wamp\www\concrete\concrete/blocks/event_manager/controller.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\wamp\www\concrete\concrete\core\libraries\loader.php on line 217

Have you a solution? :)
VanNoctar replied on at Permalink Reply
Up
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
The usual thing if you have got all directory right is that the naming of classes and files has something wrong. Package and Block controllers simply won't be recognised if the slash/and/under_score path does not map correctly to the CamelCase class name.
enlil replied on at Permalink Reply
enlil
if you could PM a copy of the package i would take a look at it for you :)
VanNoctar replied on at Permalink Reply
I send you a MP :) thank you
VanNoctar replied on at Permalink Reply
Okay, the problem is solved!

My blockController class has the follow name : EventManagerController and the good name is EventManagerBlockController.

Thank you for your help!!