Message when clicking 'make the block'Browser Info Environment
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
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.
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.
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>
Here's an excerpt from composer.php for that field type:
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 :)
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?
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).
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.)