[TYPO3-dev] pi_flexform bug (found it)
Olivier Laurent
olivier at trynisis.com
Tue Mar 3 12:55:57 CET 2009
Hello,
I've been busy the last days trying figuring out what's going on with a
bug I have with my first plugin.
A field "categorieslist" is supposed to be a list of selected
categories. It seems to work in the backend. The selected categories are
correctly shown "but" once I try to get the values back in the frondend
(which is supposed to be a comma separated list of values through
pi_getFFvalue() ) all I get is the total of the selected values.
I use flexform for the backend form. it looks like this in the mysql
database (uid of the content block: 12)
select pi_flexform from tt_content where uid=12;
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<T3FlexForms>
<data>
<sheet index="sDEF">
<language index="lDEF">
<field index="modeBrowse">
<value index="vDEF">category</value>
</field>
<field index="categorieslist">
<value index="vDEF">2</value>
</field>
</language>
</sheet>
<sheet index="display">
<language index="lDEF">
<field index="result_output">
<value index="vDEF"></value>
</field>
</language>
</sheet>
<sheet index="error">
<language index="lDEF">
<field index="show_errors">
<value index="vDEF">0</value>
</field>
<field index="prepend_text">
<value index="vDEF"></value>
</field>
</language>
</sheet>
</data>
</T3FlexForms> |
Since I can correctly see the selected items in the backend, those values have to be stored somewhere!
After hours of debugging I finally found where those values are stored.
mysql> select * from sys_refindex where recuid=12;
+----------------------------------+------------+--------+-------------+--------------------------------+-------------+------------+---------+---------+--------------------------+---------+------------+
| hash | tablename | recuid | field |
flexpointer | softref_key | softref_id | sorting |
deleted | ref_table | ref_uid | ref_string |
+----------------------------------+------------+--------+-------------+--------------------------------+-------------+------------+---------+---------+--------------------------+---------+------------+
| 7c62bd924f0f009c7f3c1ce3457bde68 | tt_content | 12 | pi_flexform |
sDEF/lDEF/categorieslist/vDEF/ | | | 0
| 0 | tx_doclibrary_categories | 4 | |
| c8b1d98f6cc24b07569faf058267a0a9 | tt_content | 12 | pi_flexform |
sDEF/lDEF/categorieslist/vDEF/ | | | 1
| 0 | tx_doclibrary_categories | 8 | |
+----------------------------------+------------+--------+-------------+--------------------------------+-------------+------------+---------+---------+--------------------------+---------+------------+
2 rows in set (0.00 sec)
So on one hand my flexform only stores a total (pointless IMHO) and on
the other hand sys_refindex has the list of the values.
Well now I have a workaround but it doesn't look like the proper way, at
least the one you indicate in your documentation.
Olivier
More information about the TYPO3-dev
mailing list