Feb 25
After further investigation of the problem I posted last Thursday, I finally found a solution to get it to work! I took a closer look at the subversion repository and found another branch (which is described nowhere). So you have to add an svn:external to the plugin folder named sfPHPUnitPlugin and targetting to http://svn.symfony-project.com/plugins/sfPHPUnitPlugin/branches/1.0/. Then you need to update the plugin folder. If you then type symfony -T, the new tasks are visible.
Hurray! But wait a minute: it still doesn’t work! There seems to be one mistake in the file “sfPHPUnitTestPrinterTap.php” in the “lib” directory of the plugin. In line 159, you need to replace the “$suite->testCount()” by “$suite->count()” and then it finally works! Unbelievable, but true. After a long journey, I made it – symfony runs with PHPUnit. Thank God.
Feb 21
I am currently working on a small project and I decided to use symfony, because this framework has some good features. I follow the given tutorial to come to the 15th day today, the unit test day. Symfony uses an own “Framework” (it’s 1 file) called lime. Sadly the whole testfile looks very weird and not really useable. As I used ASUnit and PHPUnit several times in the past, I think this is quite lame.Weiterlesen »
Feb 21
There are a lot of extensions out there which modify the TYPO3 login somehow. Some of them user an LDAP server, some use a X.509 certificate. What I am missing, is the possibilty to use a webservice. Let’s assume this webservice already exist, so we won’t discuss it here. Weiterlesen »
Feb 18
I just had a strange error in a piece of PHP code. It should query a MySQL database and render an HTML selectbox out of the result. Sadly, the selectbox had exactly one entry less than the table! This entry was unique – it had an umlaut as first character and that was the clue for me: the encoding!
The database table was encoded in latin1_swedish… and the file was utf8. Initially I thought: well, if I use utf8, I’m quite safe but I was wrong – obviously. Then I used Eclipse and saved the file with iso-8859-1 encoding and hurray: it worked!
What I found confusing about this, was the fact that this very sql statement returned the completely correct result when entered in phpMyAdmin! Seems like the file encoding there was correct rightaway.
Feb 11
Currently, I use Symfony to create a small Web-Community. Because I use MAMP on my Mac, I tried to create a virtual host as said in the installation manual of Symfony and therefore I edited the httpd.conf file in the MAMP directory. Sadly I previously changed the path to my document root using the actual MAMP control to point at /Users/Grundi/Sites. This variation of the original file seems to push MAMP to rewrite the httpd.conf on every server restart – without my changes of course.
In Symfony, I then had the problem that all the files which are located in the Symfony library (web/sf/…), could not be loaded. As I also use AJAX, and therefore Prototype is needed, my whole application was broken. Weiterlesen »
Feb 08
Die aktuelle Version der TYPO3-Extension rgaccordion sorgt in zwei verschiedenen Modi dafür, dass normale Inhaltselemente im TYPO3 als Akkordion dargestellt werden. Dies kann über eine Checkbox am Element ein- und ausgeschaltet werden. Für den ersten Modus klappt das auch hervoragend, im 2. wird jedoch der Wert der Checkbox nicht ausgelesen.
Ich habe das nötige Typoscript in der Datei ext_typoscript_setup.txt so angepasst, dass das Verhalten jetzt stimmt. Hier der Code:
...
plugin.tx_rgaccordion2 {
stdWrap.outerWrap = <div class="rgaccord2-content">|</div>
stdWrap.outerWrap.if.isTrue.field = tx_rgaccordion_accordion
stdWrap.outerWrap.stdWrap.prepend = COA
stdWrap.outerWrap.stdWrap.prepend {
1 = TEXT
1.value = <div class="csc-header rgaccord2-toggle"><h1>
1.if.isTrue.field = tx_rgaccordion_accordion
2 = TEXT
2.value = <div class="csc-header"><h1>
2.if.isFalse.field = tx_rgaccordion_accordion
5 = TEXT
5.field = header
5.ifEmpty = no headline set!
10 = TEXT
10.value = </h1></div>
}
}
...
Den Autor der Extension habe ich benachrichtigt, ich denke in der nächsten Version ist der Bug nicht mehr drin.
Feb 08
Wer im TYPO3 die Extension realurl benutzt, hat sicher auch schonmal was von der fl_realurl_image gehört. Diese Extension erzeugt auch für Bilder “schöne” Namen. Ich hatte nun das Problem, dass ich die beiden Extensions zwar installiert, aber noch gar nicht aktiviert hatte. Trotzdem scheint letztere Extension sich irgendwie einzuklinken. Das Ergebnis ist: alle Bilder fehlen!
Scheinbar liest die Extension nicht aus, ob realurl überhaupt aktiviert ist. Um das zu beheben, braucht man nur die Extension im Extension Manager anzukicken und den Haken bei “Enable the Extension” rauszunehmen, dann geht es wieder.
Feb 05
Ich entwickle gerade eine kleine Anwendung mit Symfony und benutze dabei das Askeet-Tutorial. Am Tag 6 des Tutorials wird eine validation YAML-Datei erstellt die login.yml heisst. Da der Inhalt bereits vorgegeben ist, hat es mich gewundert, dass ich immer folgenden Fehler bekam:
Configuration file ……/login.yml is missing “names” category
Nach längerem Probieren blieb mir schließlich nur noch das Orakel übrig. Dessen Antwort enthielt unter anderem ein Forum und das wiederum dann (dank der Suchfunktion) den entscheidenden Hinweis: Encoding und Line Endings müssen passen, sonst geht nichts! Ich hab also schnell das File als UTF8 mit LF-Endings gespeichert und siehe da, es geht!
Das hat locker ne Stunde gedauert bis ichs raus hatte – uff.
Jan 23
Ich habe gerade das Kontaktformular eines Mailformplus-Templates um ein Captcha bereichern wollen. Mit dieser kleinen Anleitung [PDF] erschien mir das auch ganz einfach. Das Problem war allerdings, dass das Bild zwar im HTML-Code war, aber nicht im Browser sichtbar. Nach dem Aufruf der PHP-Datei die als Quelle für das Bild angegeben ist, sah ich zahlreiche PHP Notices. Der Extensionautor scheint die bei sich nicht angeschaltet zu haben.
Um das trotzdem nutzen zu können, muss einfach ein “@” vor die ganzen define- und require-Anweisungen geschrieben werden. Das bewirkt, dass Fehlermeldungen unterdrückt werden. Nicht wirklich schön, da es sich hier aber nicht um Fehler, sondern nur um Hinweise handelt, nicht weiter tragisch. Weiterlesen »