[TYPO3-kickstarter] Problems creating a TYPO3 extension on Windows

Peter Op den Velde Boots podvelde at xs4all.nl
Wed Jul 6 17:00:34 CEST 2011


Hello All,

I have a simple question about the kickstarter: does it work in a
Windows environment ??

I would appreciate if someone with in-depth knowledge of TYPO3 would be
so kind as to read the explanation below and give his/her opinion.

//----------------------------------------------------------------------
-

Explanation (compilation of a few posts on the German TYPO3 forum):

I'm Running TYPO3 Version 4.5.3 on PHP 5.2.17 on a Windows7 (64bit PC)
using the introduction package as a starting point.

Part I

I've built a first-cut extension using the kickstarter. The extension is
selectable when defining a new page element, so I've defined a new page
consisting of a text page element and my plugin (for my plugin I've
defined a short dummy header text as part of the page element).

When I request this page as part of the web site, I see my text page
element, the dummy header text of my plugin's page element, but no trace
of the plugin output itself. Given that the kickstarter-generated main
function of the plugin appears to generate some dummy output, I would
expect this dummy output to appear right after my dummy header text, but
it doesn't. I've checked that with View Source: no trace, not even a
<div>.

After concluding that no output was generated, I've truncated the
kickstarter-generated main function to the bare minimum, but this makes
no difference (PMV are my initials; I always use them whenever I need
something recognisable):

function main($content, $conf) {
    $this->conf = $conf;
    $this->pi_setPiVarDefaults();
    $this->pi_loadLL();
    $this->pi_USER_INT_obj = 1;
    $content='<strong>This is a few paragraphs by PMV:</strong><br />';
    return $this->pi_wrapInBaseClass($content);
}

Now my question is, am I doing something wrong (e.g. is there an enable
flag hidden somewhere) and/or do I need to do more to have the plugin
generate some output, or could this be a sign of some sort of
installation problem (as I have had lots of those already) ?

Part II

Of course, I do not know if it has anything to do with the silent
extension problem, buf if I go to the Extension Manager, select my
plugin, then select "Edit Files" and then choose any file (like e.g.
README.txt) from the list, I get an exception trace:

Uncaught TYPO3 Exception
#1270853980: TYPO3 Fatal Error: Error while trying to download the
extension file... 

and the log file says: Error:Sys!; Action:[5_0] Core: Exception handler
(WEB): Uncaught TYPO3 Exception: #1270853980: TYPO3 Fatal Error: Error
while trying to download the extension file... | RuntimeException thrown
in file C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\htdocs\typo3\typo3\sysext\em\classes\index.php in
line 1670

Now this index.php just before line 1670 looks like this:

$dlFile = $this->CMD['downloadFile'];
if (t3lib_div::isAllowedAbsPath($dlFile) && 
   t3lib_div::isFirstPartOfStr($dlFile, PATH_site) &&
   t3lib_div::isFirstPartOfStr($dlFile, $absPath) &&
   @is_file($dlFile)) {
     $mimeType = 'application/octet-stream';
     Header('Content-Type: ' . $mimeType);
     Header('Content-Disposition: attachment;
filename='.basename($dlFile));
     echo t3lib_div::getUrl($dlFile);
     exit;
} else {
   throw new RuntimeException('TYPO3 Fatal Error: ' . 
     $GLOBALS['LANG']->getLL('ext_details_error_downloading'),
1270853980);
}


And that's exactly the exception I see when I try to open README.txt (my
extension is called gg_web_tools1; no editing done whatsoever):

- dlFile:
C%3A%2FProgram%20Files%20%28x86%29%2FApache%20Software%20Foundation%2FAp
ache2.2%2Fhtdocs%2Ftypo3%2Ftypo3conf%2Fext%2Fgg_web_tools1%2FREADME.txt

- PATH_site: 
C:/Program Files (x86)/Apache Software
Foundation/Apache2.2/htdocs/typo3/

- absPath: 
C:/Program Files (x86)/Apache Software
Foundation/Apache2.2/htdocs/typo3/typo3conf/ext/gg_web_tools1/

In t3lib_div::isFirstPartOfStr() a strpos() is being done and thus the
first three conditions in the index.php file above are all false (I've
checked by printing the outcome to a text file and in reality they are
indeed all false). As a result of these false-conditions, the exception
is generated. My problem has thus to do with escape codes in path names
that are generated by either the Extension Manager or the Kickstarter of
TYPO3.

Therefore my question: is the kickstarter supposed to work on Windows
and has anybody ever tried to use this set up ?? Any idea on how to get
this extension running e.g. outside of the kickstarter ??

Peter (podvelde at xs4all.nl),
Amsterdam, Netherlands




More information about the TYPO3-project-kickstarter mailing list