Making Your Own Blocks
Permalink
I am creating my own block as per the given example in concrite 5 "Making Your Own Blocks"
after copying my block under /c5/blocks/mycreated block
eg(/c5/blocks/basic_test)
if i am clicking on Add functionality to add the block created by me i am geting an error
An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name.
can anybody tell me how to create a new block
after copying my block under /c5/blocks/mycreated block
eg(/c5/blocks/basic_test)
if i am clicking on Add functionality to add the block created by me i am geting an error
An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name.
can anybody tell me how to create a new block
My project name is "test1"
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
My project name is "test1"
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
My project name is "test1"
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
My project name is "test1"
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
which is under www/ directory.
in my project "test1" i am copying my new block by name
"basic_test" ie under
www/test1/block/.
this block i have downloaded from the example which is given under "how to create a block."
and the name of the controller i have specified as BasicTestBlockController for "basic_test"
but again if i go and click on Add functionality to add the block created by me i am geting an error
"An unexpected error occurred.
BasicTestBlockController not found. Please check that the block controller file contains the correct class name."
I downloaded the block in my local install and it installed fine... but I'm wondering if there is an issue regarding caching...
I am also getting the same thing. It was working fine but I moved my site to Apache and changed directories at the same time - then started getting this error.
Maybe something with directory location?
Maybe something with directory location?
Sir,
I checked it,there is no issue regarding caching...
I checked it,there is no issue regarding caching...
I'm getting exactly the same problem when I try to add the basic_test block:
An unexpected error occurred.
BlockTestBlockController not found. Please check that the block controller file contains the correct class name.
Obviously the block is installed (i.e. copied) to the correct place because the Add Functionality routine is finding it. It's just not processing the controller.php correctly for some reason.
Did santosh find a solution for this?
An unexpected error occurred.
BlockTestBlockController not found. Please check that the block controller file contains the correct class name.
Obviously the block is installed (i.e. copied) to the correct place because the Add Functionality routine is finding it. It's just not processing the controller.php correctly for some reason.
Did santosh find a solution for this?
I've solved this now. The controller.php file contains just <? for the php start processing instruction. I changed this to <?php and it now works.
Thanks for catching this. I've updated the basic test block in that tutorial to no longer use short tags.
the name of the controller class must much the directory name
basic_test -> BasicTestBlockController
my_created_block -> MyCreatedBlockBlockController