Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi guys, I am doing some testing with CouchCMS and I have a bootstrap here with a lot of utilities for my projects. One thing that I could see is that when I set a variable using $CTX->set and then call <cms:dump/>, the dump outputted won't place any of the variables defined inside <cms:php> tag. Ex.:

Code: Select all
<cms:set my_first_test="1" />
<cms:php>
   global $CTX;
   $CTX->set('my_second_test', '2');
</cms:php>

<cms:dump />
<cms:dump_all />


The variable `my_first_test` will show up on the list, but `my_second_test` won't. Although it will be available to be used via <cms:show my_second_test />.

Do you guys know if this is a bug or maybe I'm missing something here?
Hi,

The variable `my_first_test` will show up on the list, but `my_second_test` won't.
I copy/pasted your exact code and could see `my_second_test` being dumped with a value of '2' just fine.

I suppose the code you pasted is not the code you are using in your testing.
Could you please send me a copy of the very template where you see this problem being displayed?

Thanks.
Ouch! My bad. I had one variable:

Code: Select all
<cms:set field_description_desc='Ideal entre 70 e 160 caracteres —
   espaços incluídos. A tag <meta type="description"> é o texto
   que aparece logo abaixo do título em uma busca no Google.' />


and it was printing the tag '<meta type="description">', so any HTML after it wasn't getting printed, but it shows up on the source code :oops: My bad! Should take a look at the source code before. It's working perfectly!
3 posts Page 1 of 1