Mrz 25
To offer my blog to more people, I decided to publish my posts also in english some time ago. To do with wordpress as easy as possible, I used the jLnguage Plugin. After a little while, the category feed for eSteak was not working any more. I noticed that quickly because this feed is displayed on the eSteak homepage. I did not really find a reason for that, so my only solution was, to put that post into another category.
During the last few days, I realized that my feedburner feed had no readers any more and I asked myself why. At least the news services with wich I signed up should have been there. After checking it myself, I got timeout, plus a cpu load of almost 100% caused by a single httpd2 process. Weiterlesen »
Mrz 12
After editing one single class file in my project (one in /lib that has nothing to do with the database), I unpredictably got the error "wrapped: Cannot fetch TableMap for undefined table: xxx" in the prod mode as well as in the dev mode.
XXX stands for a random table name in my database.
I tried to clear symfony cache, browser cache and finally I replaced the file with the old version, with any improvement of the situation. My last chance was a restart of the apache server, then everything was running like before. I have absolutely no clue where this error came from...
UPDATE: The restart was not the solution! The error just took some time to reappear. Thus, I added some debug code before the actual php exception is thrown. Then I found out that "lib/model/om/BaseXXXPeer.php" could not include the file "lib/model/XXXPeer.php" which is very logical for me, because the controller is located in "web/". Seen from there, tha path should be "../lib/model ...". After adding "../" to the include_path variable in the php.ini, the error seems to be gone.
I don't get why those includes do not use absolute paths. It would be very nice to see this in the next version of symfony.
Mrz 12
After upgrading from php 5.0.4 to 5.2.5 on my server, I got a blank page as output several times. In dev mode, the error message said, that a creole file could not be loaded. I had to change the include_path value in the php.inito get it working. I just added "/usr/share/php/pear/symfony/lib/vendor", then the error was gone. Depending on whether you installed your symfony via pear or via svn, the path has to be changed of course.
Finally, don't forget to clear the symfony cache (symfony cc).
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 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 07
Ich bin bei der Arbeit auf ein Problem gestoßen für das ich nicht wirklich ein Lösung hatte. Kurz umrissen: Wenn der Inhalt eines Formularelementes im IE größer wird als vorgesehen und das Feld ein Hintergrundbild hat, dann verschwindet das Hintergrundbild langsam mit dem Text der eingegeben wird.
Gleich vorweg: für Textareas habe ich noch keine Lösung gefunden, für Input-Felder kann man sich aber mit einem kleinen Trick helfen. Wenn das Element Höhen- und Breitenangeben besitzt (sollte es), kann man mit "background-position: right bottom;" (und background-attachment: scroll;) den optischen Eindruck erwecken, als bliebe es an Ort und Stelle. Technisch wird das Element zwar größer, das Bild jedoch "rückt nach".
Mit diesem Workaround kann man (in Kombination mit Conditional Comments) ein annehmbares Ergebnis in allen Browsern erzielen.
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.