[TYPO3-core] RFC: Bug #3544: RTE-config in PageTS-config not loaded when in draft-workspace

Michael Stucki michael at typo3.org
Tue Feb 6 16:11:38 CET 2007


The patch is still pending for TYPO3_4-0 though...

- michael

Michael Stucki wrote:
> I have investigated this issue again. Finally, I applied the attached 
> patch to Trunk which seems to work according to user feedback. If we 
> encounter problems in RC1, then I know where they come from... :-)
> 
> - michael
> 
> Michael Stucki wrote:
>> REMINDER. This fix was proposed by someone who apparantly could reproduce
>> the error, so it seems it does what it promises...
>>
>> Any +1?
>>
>> - michael
>>
>> Martin Kutschker wrote:
>>
>>> Wolfgang Klinger schrieb:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> *hiya!*
>>>>
>>>> Michael Stucki wrote:
>>>>
>>>>> Bugtracker reference:
>>>>> http://bugs.typo3.org/view.php?id=3544
>>>> +1, simple
>>> The patch is simple, but has it any effects? WS code has some many
>>> get-this-if-that switches that I wouldn't dare to change anything ;-)
>>>
>>> Perhaps Dmitry, if not Kasper himself, could have a look at this 
>>> seamingly
>>> easy fix.
>>>
>>> Masi
>>
>>
>> ------------------------------------------------------------------------
>>
>> # Patch by Andreas Wolf
>> Index: t3lib/class.t3lib_befunc.php
>> ===================================================================
>> --- t3lib/class.t3lib_befunc.php    (Revision 1802)
>> +++ t3lib/class.t3lib_befunc.php    (Arbeitskopie)
>> @@ -2809,10 +2809,16 @@
>>              }
>>              // ... else the pos/zero pid is just returned here.
>>          } else {    // No integer pid and we are forced to look up 
>> the $pid
>> -            $rr = t3lib_BEfunc::getRecord($table,$uid,'pid');    // 
>> Try to fetch the record pid from uid. If the uid is 'NEW...' then this 
>> will of course return nothing...
>> +
>> +            $rr = 
>> t3lib_BEfunc::getRecord($table,$uid,'pid,t3ver_oid');    // Try to 
>> fetch the record pid from uid. If the uid is 'NEW...' then this will 
>> of course return nothing...
>> +                // First, check if the pid is -1 => it is a record in 
>> a draft workspace => get the "real" record
>> +            if (is_array($rr) && $rr['pid']=='-1')    {
>> +                $rr = 
>> t3lib_BEfunc::getRecord($table,$rr['t3ver_oid'],'pid');
>> +            }
>> +
>>              if (is_array($rr))    {
>> -                $thePidValue = $rr['pid'];    // Returning the 'pid' 
>> of the record
>> -            } else $thePidValue=-1;    // Returns -1 if the record 
>> with the pid was not found.
>> +                $thePidValue = $rr['pid'];    // Return the "pid" of 
>> the record
>> +            } else $thePidValue = -1;    // Return "-1" if the record 
>> with the pid was not found
>>          }
>>  
>>          return $thePidValue;
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: t3lib/class.t3lib_befunc.php
> ===================================================================
> --- t3lib/class.t3lib_befunc.php	(Revision 2005)
> +++ t3lib/class.t3lib_befunc.php	(Arbeitskopie)
> @@ -2895,10 +2895,21 @@
>  			}
>  			// ... else the pos/zero pid is just returned here.
>  		} else {	// No integer pid and we are forced to look up the $pid
> -			$rr = t3lib_BEfunc::getRecord($table,$uid,'pid');	// Try to fetch the record pid from uid. If the uid is 'NEW...' then this will of course return nothing...
> +			$rr = t3lib_BEfunc::getRecord($table,$uid);	// Try to fetch the record pid from uid. If the uid is 'NEW...' then this will of course return nothing...
> +
>  			if (is_array($rr))	{
> -				$thePidValue = $rr['pid'];	// Returning the 'pid' of the record
> -			} else $thePidValue=-1;	// Returns -1 if the record with the pid was not found.
> +					// First check if the pid is -1 which means it is a workspaced element. Get the "real" record:
> +				if ($rr['pid']=='-1')	{
> +					$rr = t3lib_BEfunc::getRecord($table,$rr['t3ver_oid'],'pid');
> +					if (is_array($rr))	{
> +						$thePidValue = $rr['pid'];
> +					}
> +				} else {
> +					$thePidValue = $rr['pid'];	// Returning the "pid" of the record
> +				}
> +			}
> +
> +			if (!$thePidValue)	$thePidValue = -1;	// Returns -1 if the record with this pid was not found.
>  		}
>  
>  		return $thePidValue;


-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list