Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi KK,
I have a strange problem with Couch at http://pomponstar.fr/index.php

I use a php page which calls a template ( $tpl->display('index'); ).

My couch edibles are in the PHP page like that:
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Accueil'>
<cms:editable name='seo' type='group' label='Entrez toutes les données svp' />
<cms:editable name='titre' type='text' group='seo' label='Titre principal' />
[...]

and my tags in the .tpl file like that:
<div class="text-center panel topanel">
<h1 class="title1"><cms:show titre /></h1>
<h2 class="title2"><cms:show stitre /></h3>
[...]

Nothing out of the ordinary so far.

But couch doesn't retain the infos stored, it works like that:
I enter the variable in the control panel - it works
I view the page - it works
I refresh the page -> the data are gone and the admin says "field not found - erase ?"
Then I refresh the front-end again -> it works, the data are still there. :mrgreen:

I don't get it.

( I used an ob_start() to avoid an header call error before, but I erased it from the page to test it wasn't that already )

Any idea?
Thanks,
Paolo E.
Hi KK,

Ok, it seems solved.

I think it was a buffer and cache problem.

Now I'm adding an ob_start() to each php page one by one, add the template tags in the .tpl page, authenticate the CMS in the .tpl by loading it and checking with the admin and it seems to works well.

Sorry to have bothered you.
Cheers,
Paolo E.
Hi Paolo,

Adding ob_start() shouldn't really be needed as it happens to be the first statement in require_once( 'couch/cms.php' );

Anyway, I am glad the problem is solved :)
Hi KK,

I didn't know that, but it was the only way I found to solve the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/pomponst/www/couch/cms.php:379) in /home/pomponst/www/couch/cms.php on line 378

Any 'cleaner' suggestion, would be welcome...

( I already read viewtopic.php?f=4&t=53 )

Cheers,
Paolo
4 posts Page 1 of 1