Message when clicking 'make the block'
Permalink Browser Info Environment
Hi there
I am appreciating your excellent piece of software and have added a new review for you.
When I click 'Make the Block' I get the message:
But then I can go ahead and install the block in the usual way (it's created correctly).
Is this the behaviour I am supposed to see?
On another subject entirely, I followed the instructions on this page
http://www.concrete5.org/documentation/how-tos/developers/how-to-op...
to add my newly-created block to the composer. I wonder if you have thought of automatically generating the composer.php file at block creation time? In my opinion the composer functionality in 5.7 is solid, but the user experience is not. So anything we can do to make things easier I think would be a good thing.
Best wishes and many thanks for your hard work in creating this excellent add-on.
Daniel
I am appreciating your excellent piece of software and have added a new review for you.
When I click 'Make the Block' I get the message:
Block type BLOCK_NAME_APPEARS_HERE does not exist (anymore).
But then I can go ahead and install the block in the usual way (it's created correctly).
Is this the behaviour I am supposed to see?
On another subject entirely, I followed the instructions on this page
http://www.concrete5.org/documentation/how-tos/developers/how-to-op...
to add my newly-created block to the composer. I wonder if you have thought of automatically generating the composer.php file at block creation time? In my opinion the composer functionality in 5.7 is solid, but the user experience is not. So anything we can do to make things easier I think would be a good thing.
Best wishes and many thanks for your hard work in creating this excellent add-on.
Daniel
Type: | Discussion |
---|---|
Status: | Resolved |
Yes that's all I did. Well to be exact I copied 'form.php' instead as edit.php contains only an include to it.
Here's an example:
Cheers
Daniel
Here's an example:
<div class="form-group"> <?php echo $form->label("name", t("Name")); ?> <?php echo isset($btFieldsRequired) && in_array('name', $btFieldsRequired) ? '<small class="required">' . t('Required') . '</small>' : null; ?> <?php echo $form->text($this->field("name"), $name, array ( 'maxlength' => 255, 'placeholder' => 'Organisation Name', )); ?> </div>
Cheers
Daniel
Just thought I would share a finding of mine with the Composer work I was doing. All went well until I tried a block with the WYSIWYG field type and then Composer stopped working for me (just got a faded white page instead of the Composer fields).
Here's an excerpt from composer.php for that field type:
Here's an excerpt from composer.php for that field type:
<div class="form-group"> <?php echo $form->label("description", t("Description")); ?> <?php echo (isset($btFieldsRequired) && in_array('description', $btFieldsRequired) ? '<small class="required">' . t('Required') . '</small>' : null); ?> <div id="wysiwyg-ft-description"><?php echo $form->text($this->field('description') $description); ?></div> <script type="text/javascript"> var CCM_EDITOR_SECURITY_TOKEN = "<?php echo Loader::helper('validation/token')->generate('editor')?>"; $(function () { $("#wysiwyg-ft-description").redactor({ minHeight: "300", "concrete5": { filemanager: <?php echo $fp->canAccessFileManager()?>, sitemap: <?php echo $tp->canAccessSitemap()?>, lightbox: true }, "plugins": [
Viewing 15 lines of 22 lines. View entire code block.
Hi Daniel,
Would have thought it wouldn't be simple copy/pasting. If you make a new topic about the composer thingy, I can look at that feature later as I have some other things going on at the moment. This way I won't forget, as this topic isn't about the composer.php file originally.
Are you having more problems with fields, or was this the only one? You can mention all the stuff you experienced in a new topic if you'd be so kind to do that :)
Kind regards,
Ramon
Would have thought it wouldn't be simple copy/pasting. If you make a new topic about the composer thingy, I can look at that feature later as I have some other things going on at the moment. This way I won't forget, as this topic isn't about the composer.php file originally.
Are you having more problems with fields, or was this the only one? You can mention all the stuff you experienced in a new topic if you'd be so kind to do that :)
Kind regards,
Ramon
Hi Daniel,
I can't seem to replicate the error message you're having (I seem to recall this happening in the past though with some older version). Can you give me your config.json contents (of the block you had this error with) and your block designer version number?
Kind regards,
Ramon
I can't seem to replicate the error message you're having (I seem to recall this happening in the past though with some older version). Can you give me your config.json contents (of the block you had this error with) and your block designer version number?
Kind regards,
Ramon
I believe the attached .json file came from a block that had a message like the one I described. (Added extension .txt as the C5 site reported 'File config.json has an invalid extension.'.) Block Designer version v1.0.2
Thank you
Daniel
Thank you
Daniel
Hi Daniel,
Didn't get the error message myself with this config, so not sure what happened there. If I check in the code, this error could have only been displayed if the folder of the block type not exists or if the controller.php file is not there... So, I'm rather confused to be honest. If the block has been created and everything went fine, then it's OK for you.
Whenever you do have a problem again and it does not install, let me know!
One question though, why did you pick a text box for your "website" field? Could have been the URL field I guess? If the URL field does not meet your requirements, you can let me know, so I can update it to your likings (if it's a universial addition to the field).
Kind regards,
Ramon
Didn't get the error message myself with this config, so not sure what happened there. If I check in the code, this error could have only been displayed if the folder of the block type not exists or if the controller.php file is not there... So, I'm rather confused to be honest. If the block has been created and everything went fine, then it's OK for you.
Whenever you do have a problem again and it does not install, let me know!
One question though, why did you pick a text box for your "website" field? Could have been the URL field I guess? If the URL field does not meet your requirements, you can let me know, so I can update it to your likings (if it's a universial addition to the field).
Kind regards,
Ramon
OK thanks for your findings. As far as I am concerned it doesn't really matter too much - the block is created correctly and I can then install it.
I tried using the URL field type but it seemed to ask for two items: the anchor text and the URL. For this particular project it's already clear to the public (from page context) where they will go when they click the link, so it's just labelled 'Visit site now' for simplicity of data entry. (I hide it in the browser using jQuery if there's no URL entered.)
Many thanks
Daniel
I tried using the URL field type but it seemed to ask for two items: the anchor text and the URL. For this particular project it's already clear to the public (from page context) where they will go when they click the link, so it's just labelled 'Visit site now' for simplicity of data entry. (I hide it in the browser using jQuery if there's no URL entered.)
Many thanks
Daniel
That's not the usual behavior... I will investigate this. To be continued.
As for the composer part; I didn't know that existed. I'm not much a composer guy, so that may be the very reason I didn't know. Not sure if this works for every field though, so would have to test that. Only thing you did was rename the "names", right? After copying edit.php of course and rename it to composer.php.
Kind regards,
Ramon