[TYPO3-install] Missing in action!! Filelinks, SearchForm Labels, Login Form Lables, and all Plugins

Matt Dayton matt at ukstudentdiary.com
Sun Oct 8 18:47:25 CEST 2006


Here is the PHP I used to fix my problem with my XML Labels; however the Plugins are still not rendering.  Back to troubleshooting
   
  this function is found in t3lib/class.t3lib_div.php and can be replaced with
   
  **********************************************
  function validPathStr($theFile) { 
                return preg_replace('/(\/|\\\)++/','/', $theFile);
  if (!strstr($theFile,'//') && !strstr($theFile,'\\') && !preg_match('#(?:^\.\.|/\.\./)#',$theFile)) return true;
 }
  *****************************************************
   
   
  

Matt Dayton <matt at ukstudentdiary.com> wrote:
  Thank you Micheal for the insightful assist!

I have debuged t3lib/class.t3lib_div.php and discoverd that my problem lies in the t3lib/class.t3lib_div.php => function getFileAbsFileName(), line 3212. 

For some unknown reason, only when the FE uses this function, $filename has two prefix slashes instead of one slash witch results in the validPathStr function to return an empty $LOCAL_LANG array. 

In example, the " $filename" before line:
*****
if (strcmp($filename,'') && t3lib_div::validPathStr($filename)) { // checks backpath.
return $filename;
}
*****
is returning: //typo3/sysext/css_styled_content/pi1/locallang.xml
and of course even if this filename passes the validPathStr funtion, it would surely not pass the XML caching later on.

Because I am new to Typo3 and PHP, I am in desperate search for some advice and maybe a helping hand. Fumbling around with an IF statement to chop of this extra slash, has proved more dificult than I had thought. 

Maybe modifying the class.t3lib_div.php is overkill and I am overlooking a simple typoscript setting somewhere. 

please help??






More information about the TYPO3-install mailing list