[TYPO3-english] TS-Problem: Empty select if FCE is a reference

Dmitry Dulepov dmitry.dulepov at gmail.com
Tue Aug 11 12:47:43 CEST 2009


Hi!

Andre Dittmar wrote:
> I'm using the abstract of the page properties as content in a
> FCE-Element in the field "field_text". A existing abstract may be
> overwritten by user input in this field. Everything working fine so far,
> excepting when I make a reference of the FCE-Element. The content of
> field "field_headline" will still be shown in the frontend correctly,
> but the abstract of the "field_text" is missing. The content of
> "field_text" works, if the content is entered directly in the original
> FCE (and so overwrites the abstract from page properties). The field
> "field_headlink" is a "Link"-Element, thus it contents the Page-ID of a
> selected page.
> 
> I guess the problem is, that "field_headlink" is empty in the
> reference-Element and therefore the select of the CONTENT-Object returns
> nothing. The question is now how to optimize this part? I have no clue
> at the moment how to handle this in a alternative way?

First of all, is it empty of does contain a page id? You say opposite things in two paragraphs :(

Secondly, you should know that "select" in content selects content from a current page unless you specify pidInList. This is important for the following part of your TS:

>       select {
>         where = hidden=0 AND deleted=0
>         andWhere {
>           dataWrap = pages.uid={field:field_headlink}
>         }
>       }


So what you actually get in SQL is: "pages.pid=<current> AND pages.uid=<field_headlink>". I guess it is not correct.

-- 
Dmitry Dulepov
Facebook: http://www.facebook.com/dmitryd
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs


More information about the TYPO3-english mailing list