[TYPO3-dev] Changing value in plugin has no effect - cache problem in plugin?

bernd wilke xoonsji02 at sneakemail.com
Mon Aug 11 20:08:19 CEST 2008


on Mon, 11 Aug 2008 11:03:49 +0200, Brian Bendtsen wrote:

> bernd wilke skrev:
>> on Wed, 06 Aug 2008 10:56:16 +0200, Brian Bendtsen wrote:
>> 
>>> Hi
>>>
>>> I have made a frontend plugin and I use flexforms for several
>>> configuration options, like which html tempate to use, background
>>> color etc.
>>>
>>> When I try to change a value like the background color, the change is
>>> not visible in the frontend. I have cleared all cache multiple times.
>>>
>>> The only thing that works, is if I delete the plugin and create it
>>> again with the new values.
>>>
>>> Any hints?
>>>
>>> /Brian
>> 
>> you may debug the values your plugin gets. (I use cc_debug for another
>> output-window.)
>> 
>> on the other hand you may look wether your changed paramters are stored
>> in the database. As flexform-fields are gathered in one single table-
>> fields it is not so easy to edit values with phpmyadmin, but the
>> serialized data in the flexform-field can be viewed.
>> 
>> 
>> bernd
> Sorry for the delay, the data I type in is actually saved in the
> database in the pi_flexform field, but the output is not the same as the
> value in the database??
> 
> Any hints?

do it step by step backward.

write some debug-statements in your extension.
beginning with the point, where you output the 'unmodified' value.
then go back to the beginning of 
- function
- loop
- if
insert another debug
continue until you find the origin of the 'unmodified' value.

using debugs you ensure, that the output is not cached, but a live-value.


the other way: 
at the start of your extension read your value from DB.
insert a debug to ensure the modified value.
then insert debugs, every time the variable is used. until you reached 
the point where the old value appears.

use this statement:
debug($variable,'name of variable',__LINE__,__FILE__);
beside the value of the variable, you will get the file and line of your 
debugstatement.


bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html




More information about the TYPO3-dev mailing list