Are you calling the snippet uncached?
Yes, that was my first idea, too. It is called uncached. And to be absolutely sure I start quickemail before and after the the procedure which results in two emails every time the snippet is called but unfortunately without any changing/counting of the TV.
Is it maybe possible that this is a caching-problem? Maybe that the TV is locked after modified once or the resource is loaded for the first time after clearing the cache?
Hi,
I'm currently having the same problem! The TV is only written 1 times! I call the snippet unchached.
Is there a solution in the meantime?
Greetings,
Martin
You might try:
$modx->resource->setTVValue('counter', $newValue);
No need to get or save the TV object.
[Update] Never mind -- setTVValue() just does exactly what your existing code does.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
[ed. note: BobRay last edited this post 14 years, 3 months ago.]
Hi @lettis,
could you fix the problem in the meantime?
I'm still hanging with the fact that the TV is only written once until cache is cleared.
Greetings,
Martin
Be sure to make that tag that displays the TV uncached.
And $tvzaehler in the code above should be $tvcounter.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html