Project

General

Profile

Actions

Bug #64951

closed

Fluid - extbase_type

Added by Guy Couronné about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2015-02-09
Due date:
% Done:

0%

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

Description

Hi,

I have an object, compte :

namespace Foo\FooTest\Domain\Model;

class Compte extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
 /**
     * Basic
     *
     * @var \Foo\Bar\Domain\Model\Basic
     */
    protected $basic = NULL;
    ...
}

Here, an extension of this object (with tx_extbase_type field's)

namespace Foo\FooTest\Domain\Model;

class CompteFacebook extends Compte {
    ...
}

Here my object Basic :


namespace Foo\FooBar\Domain\Model;

class Basic extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
/**
     * comptes
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Foo\FooTest\Domain\Model\Compte>
     * @cascade remove
     */
    protected $comptes = '';

/**
     * 
     * @return \Foo\FooTest\Domain\Model\CompteFacebook|null
     */
    public function getCompteFacebook()
    {
        $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\ObjectManager');
        $compteFacebookRepository = $objectManager->get('Foo\FooTest\Domain\Repository\CompteFacebookRepository');

        return $compteFacebookRepository->findOneByBasic($this);
    }

}

In scheduler, if I use an object Basic, I can write :

$compteFacebook = $basic->getCompteFacebook();
if(!empty($compteFacebook)) {
    ...
}

it's working.

However, in Fluid, if I write :

<f:if condition="{basic.compteFacebook}">
<f:then>
<f:link.external uri="http://mwww.facebook.com/{basic.compteFacebook.infos}" target="_blank" class='link-facebook' />
</f:then>
</f:if>

I have the follow error :

1247602160: Table 'project_typo3.tx_footest_domain_model_comptefacebook' doesn't exist

For a working Fluid, I must do this :


                <f:for each="{basic.comptes}" as="compte">
                    <f:if condition="{compte.txExtbaseType} == 'Tx_FooTest_CompteFacebook'">
<f:link.external uri="http://mwww.facebook.com/{compte.facebookId}" target="_blank" class='link-facebook' />
</f:if>
</f:for>

Actions #1

Updated by Guy Couronné about 9 years ago

I found the problem. It's not about the Core but me :).

Could you please close this bug ?

Thank you and sorry.

Actions #2

Updated by Wouter Wolters about 9 years ago

  • Status changed from New to Rejected

No problem, rejected now.

Actions

Also available in: Atom PDF