[TYPO3-dev] Workspaces, languages, where, enableFields...

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Jul 3 17:24:45 CEST 2008


Hi,

just one "quick reply": If you use enableFields() and you are in a 
draft-preview, the enableFields will be ignored in your first query, 
meaning that even hidden and not-in-time records will be selected, but 
then "dropped" later by versionOL(), which is why this should work.

Other then that, I will have to see if I have time to construct a howto 
or a "working example". The code I send before "works for me", but maybe 
because the scenario where I took it from is rather trivial.

Cheers,
Ernesto

Jonas Dübi wrote: on 03.07.2008 13:45:

> I tried this also, but it does not work. The function returns the same 
> as I set as parameter.
> 
> I can make versions, I can publish them and then they are live. But the 
> preview just not work.
> 
> I don't know any extension (expect news) which has a working preview.
> 
> And how would you do preview if you have a join with an other table and 
> if you wan't to search for special fields.
> 
> I would be realy happy if somebuddy could tell me a simple example where 
> I can see how it works, tt_news is just to complicated. They are working 
> with special selects and the pi1 is more than 3500 lines of code. I 
> wrothe the option splitting for tt_news, but I don't unserstand how they 
> do the workspace thing.
> 
> By the way how does versionOL handle records which are completely new in 
> the workspace or deleted? The records which are hidden or deleted in the 
> live won't be sent to versionOL because they are blocked by enableFields 
> in the previous select.
> 
> And please don't tell me to remove enableFields, that's one of the few 
> things in TYPO3 which are used everywhere all over the code.
> 
> Best regards,
> Jonas
> 
> 
> Ernesto Baschny [cron IT] schrieb:
>> Hi Sonja,
>>
>> Sonja Scholz wrote: on 03.07.2008 12:20:
>>
>>> thank you for your fast answer with the example.
>>>
>>> I tried to use it in my extension, but for now it doesn't work. I 
>>> don't get the workspace version of the records. I get only the same 
>>> records as in the live modus.
>>
>> Are you sure you have all "versioning" fields in your table and that 
>> you have "version" support on for your table? Kickstarter is able to 
>> generate those, have a look at what he creates when you tick on 
>> "versioning support".
>>
>> Cheers,
>> Ernesto




More information about the TYPO3-dev mailing list