Page 1 of 1
content block 'default' does not work
Posted: Sun Jun 18, 2017 1:57 pm
by DavidJessurun
Hi all,
I have:
{content block=readMoreLink wysiwyg=false oneline='true' label='Text for the read more link' default='Lees meer ...'}
in the page template. The field appears just fine, the 'default' string does not.
Any ideas why this is / how to fix it?
(Version: 2.2-beta3)
Thanks!
Re: content block 'default' does not work
Posted: Sun Jun 18, 2017 2:30 pm
by calguy1000
Works fine here.
Note: You may (or may not) be able to upgrade from 2.2-beta3 to 2.2.1 but please upgrade ASAP.
Re: content block 'default' does not work
Posted: Sun Jun 18, 2017 3:09 pm
by DavidJessurun
Yeah, just saw. Will upgrade tonight. It's only my sandbox to evaluate 2.2 for adoption for customer work. If a hacker wants to get in there, all they'll find is a lot of stuff I'm testing.
Any ideas where I might look for the cause if upgrading doesn't fix it?
Re: content block 'default' does not work
Posted: Sun Jun 18, 2017 10:32 pm
by DavidJessurun
Sadly, 2.2.1 has the same problem.
Re: content block 'default' does not work
Posted: Sun Jun 18, 2017 11:24 pm
by DavidJessurun
Update:
I'm sorry, but I was just screwing around to see what happened so I wasn't methodical and I'm not sure what did it. But maybe this helps anyway: (Sorry, not a native speaker, so I hope I'm clear enough.)
For starters:
This is an install fresh from beta3, but the database and design were ported over from an older stable. Last one, I think.
The new template was made in beta3, and applied to existing pages.
Looking at the database; there simply was no field. Not null, not empty, simply not created. The cms connects with localhost/root and obv. full rights. (I know, bad. But... sandbox.) I did run the full rights song & dance on the database/root just in case this was MySQL being screwy. Obviously with no visible changes.
An instance where I had entered a value in the field after creating the page was stored properly.
The template with the non-functional 'default=' was connected to two designs, and for some reason was not available on creation of a page, until I disconnected it from the other design. This was new... so... maybe I simply screwed up something else.
I disconnected it from one design, and created a completely new page, and this is where I think the clue is (but you know the guy who made this so I may be wrong

) and presto magico; now the value shows up just fine.
I tried writing everything down. Hope this gives you a clue.

Re: content block 'default' does not work
Posted: Mon Jun 19, 2017 7:37 am
by velden
This is an install fresh from beta3, but the database and design were ported over from an older stable. Last one, I think.
To be clear: you install a beta 3 and after that overwrite the database with the export of an older cmsms install?
Re: content block 'default' does not work
Posted: Mon Jun 19, 2017 2:06 pm
by calguy1000
Just tested again, on a different install.
The default=something argument DOES work as intended. It works for new pages only. An empty value is a valid value for existing content pages, and therefore the default value will not be displayed.