Project

General

Profile

Actions

Bug #16392

closed

Page-TSconfig ###PAGE_TSCONFIG_STR### not evaluated correctly in Backend

Added by Oliver Hader almost 18 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-07-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

A plugin on Web>Page, that is normally stored in tt_content, is configurable by a flexform. That flexform has a paragraph, using a select-type to get data from a foreign table.

The flexform-configuration on that is a bit special:
<config>
<type>select</type>
<foreign_table>tx_ohhotels_hotel</foreign_table>
<foreign_table_where>
AND pages.pid = ###PAGE_TSCONFIG_ID###
AND ('###PAGE_TSCONFIG_STR###' = '-' OR tx_ohhotels_hotel.exthotel REGEXP '(^|,)###PAGE_TSCONFIG_STR###(,|$)')
ORDER BY tx_ohhotels_hotel.title
</foreign_table_where>
<size>15</size>
<minitems>0</minitems>
<maxitems>500</maxitems>
</config>

And on Page-TSconfig we have:
TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_ID = 474
TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_STR = 1

If you have a look to the image attached, you can see, that the "Items" on the right side are shown correctly. But if chose some of the available items, save and reload the page, this selected items should be visible under "Selected:" - but here they are not!

To get more in detail, here are the performed SQL-queries (depending on the flexform-structure above):

1) This is a WRONG query, trying to get the selected-fields:
SELECT tx_ohhotels_hotel.uid,tx_ohhotels_hotel.title,tx_ohhotels_hotel.hidden
FROM tx_ohhotels_hotel,pages
WHERE pages.uid=tx_ohhotels_hotel.pid
AND pages.deleted=0 AND tx_ohhotels_hotel.deleted=0 AND 1=1
AND pages.pid = 0
AND ('' = '-' OR tx_ohhotels_hotel.exthotel REGEXP '(^|,)(,|$)')
ORDER BY tx_ohhotels_hotel.title

If you compare this query to the flexform-configuration, you can see, that the ###PAGE_TSCONFIG_STR### and ###PAGE_TSCONFIG_ID### are not correctly replaced by the configured values in Page-TSconfig.

2) And this is the correct query, used to get the items on the right side:
SELECT tx_ohhotels_hotel.uid,tx_ohhotels_hotel.title,tx_ohhotels_hotel.hidden
FROM tx_ohhotels_hotel,pages
WHERE pages.uid=tx_ohhotels_hotel.pid
AND pages.deleted=0 AND tx_ohhotels_hotel.deleted=0 AND 1=1
AND pages.pid = 474
AND ('1' = '-' OR tx_ohhotels_hotel.exthotel REGEXP '(^|,)1(,|$)')
ORDER BY tx_ohhotels_hotel.title

I think the queries for rendering the "Items:" and the "Selected:" part (as shown in the image) are composed differently. For "Selected:" the marker substituion is missing.

(issue imported from #M3906)


Files

be_select_error.png (21 KB) be_select_error.png Administrator Admin, 2006-07-21 14:47
class.ux_t3lib_transferdata.php (2.12 KB) class.ux_t3lib_transferdata.php Administrator Admin, 2007-11-05 00:27
foobar_0.0.0_201406191851.zip (512 KB) foobar_0.0.0_201406191851.zip Susanne Moog, 2014-06-19 18:52

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #30354: FlexForm select fields can't replace makers in their foreign_table_where clauseClosed2011-09-27

Actions
Related to TYPO3 Core - Bug #50785: FlexForm does not substitute markers in foreign_table_whereClosed2013-08-05

Actions
Actions

Also available in: Atom PDF