Thursday, October 27, 2011

Linux you are so funny:

[root@www typo3_src]# rm typo3_src-4.2.8/
rm: cannot remove directory `typo3_src-4.2.8/': Is a directory
[root@www typo3_src]# rmdir typo3_src-4.2.8/
rmdir: typo3_src-4.2.8/: Not a directory
[root@www typo3_src]# rm typo3_src-4.2.8/
rm: cannot remove directory `typo3_src-4.2.8/': Is a directory

Wednesday, October 26, 2011

Four Hours of my life I will never have back

So today I was creating a web site in typo3. For those of you unfamiliar with typo3, it is one of the most robust CMSs I have worked with, and one of the most complicated. For the end users, it is super simple although I can see it initially being a bit foreign. For the admin/web developer setting up the site, it is daunting sometimes. You can make php calls from the page, pull in db stuff, automate all sorts of page element creation and placement. It is powerful . . . but daunting.

I wanted to include a JavaScript call in my page, simple left menu thing that displays the 5 upcoming calendar events from another system. Now this other system makes it really simple. You plug in some parameters and it pumps out the url for you and you plug it into the page and your done.

It wouldn't work. I had a hard time getting it into Typo3 since I haven't done any Typo3 development in months and the left menu is kind of quirky on this particular site (I copied another site with all sorts of automated functions to build the menu). Once I straightened that out I thought I was home free. Oh no. Firefox and Explorer wouldn't show the events but chrome would.

Now this is where developer life really sucks. So I have three major browsers, works in one, not in the others. I haven't tried opera or safari but generally if things work in the big three (yes, in my mind chrome is in the top three), it generally works in the others (Opera fans, I know, it can be testy sometimes). The myriad of possible problems is overwhelming. Is there a conflict with another script on the page (drop down menu sing jquery, some other stuff), is there a problem with the placement - some css thing with stuff wrapping into the nethersphere beyond the visible page, is it something in the script itself that Firefox and ie don't like, or maybe (and yes, by this time I had completely lost the plot) inline JavaScript calls are some violation of new internet browser rules.

I tried all the javascript tricks to pull it in, wrapped it up in jquery calls, set the url dynamically, nothing worked. I plugged it into a stand alone copy of the site on my office machine and nothing. I googled . . . which just lead me astray.

Finally I had the idea to start cutting out pieces of the url. First the whole variable section and success, kinda. Then added them back and removed one at a time from the back. Wouldn't you know it, it was the last variable, the first one I removed, something about a user=1, that caused firefox and explorer to go haywire.

4 hours of my life I will never have back :-(