Cannot create custom block in 5.7
Permalink
I'm using version 5.7.4.1. I've followed the directions here: http://www.concrete5.org/documentation/developers/5.7/working-with-...
But when I go to Admin Dasbboard > Stacks & Blocks > Block Types, my new block is not there. I see the message "No custom block types are awaiting installation." I'm not sure what I missed. I've read a few other posts on this forum but they differ from the directions so I think they are for another version.
I placed my files in the folder application/blocks/alert_banner
controller.php
Any ideas?
But when I go to Admin Dasbboard > Stacks & Blocks > Block Types, my new block is not there. I see the message "No custom block types are awaiting installation." I'm not sure what I missed. I've read a few other posts on this forum but they differ from the directions so I think they are for another version.
I placed my files in the folder application/blocks/alert_banner
controller.php
<?php namespace Application\Block\AlertBanner; use Concrete\Core\Block\BlockController; class Controller extends BlockController { public function getBlockTypeName() { return t('Alert Banner'); } public function getBlockTypeDescription() { return t('A banner to display timed alerts.'); } }
Any ideas?
No luck WillemAnchor. I tried a couple other variations of that path and the Namespace path too. Same result.
@cahrens
Is this the path to controller.php?
application\blocks\alert_banner\controller.php
Do you want to zip your alert_banner folder and attach it so others can look at it?
Is this the path to controller.php?
application\blocks\alert_banner\controller.php
Do you want to zip your alert_banner folder and attach it so others can look at it?
The location is: application/blocks/alert_banner/controller.php
I've attached the zip. Thanks for helping out.
I've attached the zip. Thanks for helping out.
@cahrens
I downloaded the block and it installs as expected.
I downloaded the block and it installs as expected.
hmm... possibly something wrong with my concrete5 install then? Any suggestions how to debug this on my install?
I think it might be a folder path issue.
What is the name of the folder where concrete5 is installed?
Example:
- concrete5 is installed in a folder called concrete5
- this is the path to the block and controller.php file
concrete5\application\blocks\alert_banner\controller.php
What is the name of the folder where concrete5 is installed?
Example:
- concrete5 is installed in a folder called concrete5
- this is the path to the block and controller.php file
concrete5\application\blocks\alert_banner\controller.php
It's installed in a folder named "cms"
So the full path is cms\application\blocks\alert_banner\controller.php
So the full path is cms\application\blocks\alert_banner\controller.php
It installs fine for me too...
Do you have the possibility to create a completely fresh concrete5 install ?
Do you have the possibility to create a completely fresh concrete5 install ?
Would I be able to easily move my existing content over after the fresh install? If not, then I need to try and figure this out on the existing install.
I wouldn't develop on an existing site...
Maybe create a development server on your local computer ? Like XAMPP or WampServer
Bit safer to play around with :D
You could copy your life site to your development server if you need that for testing...There are a few how-to's around on how that's done.
And when your block is ready, you can just copy your /application/blocks/alert_banner map to your life site.
good luck!
Maybe create a development server on your local computer ? Like XAMPP or WampServer
Bit safer to play around with :D
You could copy your life site to your development server if you need that for testing...There are a few how-to's around on how that's done.
And when your block is ready, you can just copy your /application/blocks/alert_banner map to your life site.
good luck!
@WillemAnchor - your mention of another site sparked a thought that led to the answer... I was working in the directory of another site. No wonder I couldn't see my changes.
I had a feeling this was a boneheaded user error. Thanks so much to both of you for all your help. Sorry for wasting your time.
I had a feeling this was a boneheaded user error. Thanks so much to both of you for all your help. Sorry for wasting your time.
use \Concrete\Core\Block\BlockController;