[TYPO3-english] FLUID variable in debug full, but in frontend NULL... (o.O)?

David Gurk dgurk at medienwerft.de
Wed Aug 28 08:45:04 CEST 2013


[SOLVED]
I found this stupid logical mistake! *facepalm*

Quote: " f:debug from {example.example2} displays the expected correct "Tx_Extbase_Persistence_ObjectStorage" from the example2 object with the properties."

Each model "Example" has only ONE "example2". So this model configuration for "example" is wrong:

/**
 * example2
 *
 * @var Tx_Extbase_Persistence_ObjectStorage<Tx_Example_Domain_Model_Example2>
 */
protected $example2;

The only correct way to do what I want is:
/**
 * example2
 *
 * @var Tx_Example_Domain_Model_Example2
 */
protected $example2;


-----Ursprüngliche Nachricht-----
Von: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Im Auftrag von David Gurk
Gesendet: Montag, 26. August 2013 13:15
An: typo3-english at lists.typo3.org
Betreff: [TYPO3-english] FLUID variable in debug full, but in frontend NULL... (o.O)?

Hi Community,

I have an odd problem. Within an extension template I try to output the given model properties.

Here an example:
Model "Example"
Properties:

-          uid

-          name

-          image

-          "example2" (mapped object)

properties "example2":

-          - uid

-          - name

Within the FLUID template I add f:debugs:
f:debug from {example.name} displays the name.
f:debug from {example.example2} displays the expected correct "Tx_Extbase_Persistence_ObjectStorage" from the example2 object with the properties.

And now the odd situation:
f:debug from {example.example2.name} displays NULL instead of the expected example2 object name.

And within an f:if condition="{example.example2}" fluid displays the html from the f:then code.

I can't explain why. Have you an idea?

Thanks and best regards

David

PS: I use TYPO3 v4.7 in this project.


_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list