[TYPO3-mvc] Respect storage page ignored on object properties
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Thu May 27 18:31:10 CEST 2010
Okay, I think I found the place where things are either not yet
implemented or just not working correctly.
In file 'Typo3DbBackend.php' on line 752 in the method
'addAdditionalWhereClause' the query settinsg are checked if the storage
page should be set or not. If, then the method 'addPageIdStatement' on
line 802 is called which adds the storage pid restriction. But for MM
tables it won't do this, because there's an if statement, checking some
conditions of the TCA, where MM tables won't pass because they don't
match a specific TCA configuration.
So I think in the method 'addPageIdStatement' there should be the logic
to check if the table is a MM table, and if so, the origin-table should
be determined and then it's possible to add the correct where clause.
I'm not 100% sure if this will work, but I think it's the problem when
querying MM tables with a LEFT JOIN, but fetching the fields of the
origin table.
Any idea how to extend the method to enable a storage page for left joins?
Thanks a lot,
Thomas
Am 27.05.2010 17:05, schrieb Thomas "Thasmo" Deinhamer:
> Hello Masi,
>
> thanks for your reply.
>
> I guess you're refering to 'foreign_table_where' with
> '###STORAGE_PID###', but actually this - so it seems; as tested -
> doesn't work in Extbase, althou this only makes sense when used in the
> backend I think, because in the frontend, the page on which the
> products/records are printed can differ from the actual storage page of
> the parent records in the backend. In the end I think this is not
> possible in the frontend via 'foreign_table_where' and '###STORAGE_PID###'.
>
> So, I'm not sure if any of the other magic markers will help me out
> there, since Extbase doesn't respect them, as it seems.
>
> Is there a chance to somehow contact Jochen in a way, without disturbing
> or upsetting him? I'm desperate. xDDD
>
> Thanks a lot,
> Thomas
>
> Am 27.05.2010 16:50, schrieb Martin Kutschker:
>> Thomas "Thasmo" Deinhamer schrieb:
>>> Thanks for your answer, Sebastian.
>>>
>>> To be honest, I don't think this is a good behaviour, as it prevents
>>> using an Extbase extension for a multidomain TYPO3 installation.
>>>
>>> Of course I understand your reasons for fetching the related records
>>> from all pages, but since Extbase supports adding recursive and mutiple
>>> storage pages, it should belong to the admin/coder configuring the
>>> Extbase extension correctly to fetch all needed records accordingly,
>>> which is not very difficult. But filtering the fetched property-objects
>>> by their page uids is a lot more difficult and unneeded imho.
>>>
>>> So I'm strongly for changing this behaviour; Extbase should only fetch
>>> records from the configured storage pages.
>>
>> In the TCA you can add some "magic" markers to the where clause
>> restrictinng the related records to
>> one or more pages (even by taking some page TS into account). Ideally
>> Extbase should honour this
>> where clause. If that's not possible it has to (sigh) provide other
>> configuration means to do the same.
>>
>> Masi
More information about the TYPO3-project-typo3v4mvc
mailing list