why the hello_world block doesn't work?

Permalink
I just unzip the hello_world.zip from documentation and put it into application/blocks/.And then is was successfully installed.but when I drag it into pages,there was nothing happen...
Environment : wamp 2.5
concrete5.7.4.2

 
micrdy replied on at Permalink Reply
micrdy
Could you give us some more information? Is nothing happen? Is there a error message? Any PHP errors in your logfile?
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi medlove13,

The problem is caused by a short open tag in form.php on line 20 column 98.

Line 20 with the short open tag:
<input type="checkbox" name="booleanfield" value="1" <?php if ($booleanfield) { ?>checked<? } ?>>

Change line 20 to this:
<input type="checkbox" name="booleanfield" value="1" <?php if ($booleanfield) { ?>checked<?php } ?>>

- "<?" is being changed to "<?php"
medlove13 replied on at Permalink Reply
Bingo! Thanks!
Is this concrete5's shortage? Complicated php tag makes it is easy to be wrong... Why not considering some template language like smarty or some what...
MrKDilkington replied on at Permalink Reply
MrKDilkington
@medlove13

I am pretty confident that the short open tag was a typo.

"PHP also allows for short open tag <? (which is discouraged since it is only available if enabled using the short_open_tag php.ini configuration file directive, or if PHP was configured with the --enable-short-tags option)."
http://php.net/manual/en/language.basic-syntax.phptags.php...

There was a recent issue on GitHub to include twig templating. If you have an opinion on the topic, you might want to add it to the discussion.
https://github.com/concrete5/concrete5/issues/2717...