debugging applications
Last week I was asked to look at an issue we were having with a FTP component. I was asked to look at it as I was the last person to look at that section of code, about 6 months ago.
Our clients use this to upload images that they are going to use on their websites, with some logic to figure out if the image is to be served up as http or https.
Earlier in the year the secure uploads stopped working. At some point, either in a microsoft upgrade, or an upgrade to the FTP server software itself, the path to the upload directories changed slightly.
/path/to/directorypath/to/directoryAt that time I added a comment detailing the problem, and in the case of secure uploads I trimmed the path to not include that initial /
Last weeks changes involved expanding the comment, and removing the
ifThe ripples created from one small pebble dropped in the pond, manage to expand out to the very edges.
[‘ftp’ in quotes seems to be needed because of a bug in typo textile. ]
changed FTP to an acronym and textile doesnt have an issue with it.
IE bug (Comment Needed) Solved
Last week I mentioned that Rowan found a bit of code that didn’t display correctly in IE unless he included <!- Foo -> in his html. What was happening was the background color on two divs was not being applied, nor was the bottom border on an h2 being shown. If you selected the text, you could get it to display, or if you forced IE to redraw, by placing another window on top and then brought the document back into focus it would correct itself.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
body {
margin:0;
padding:0;
background-color:#FFF;
}
#wrapper {
width:470px;
position:relative;
text-align:left;
}
form {
margin:0px;
padding:0px;
border:0px;
}
h2 {
font-size:140%;
line-height:160%;
}
#H2fir {
padding-bottom:0px;
margin:0;
border-bottom:1px solid #CCCCCC;
}
#div1 {
padding:1px 15px 5px 15px;
margin:10px 0;
background-color:#FEF5CC;
}
#div2 {
padding:1px 15px 5px 15px;
margin:10px 0;
background-color:#FEF5CC;
}
1 2 3 | |
Today, I removed the css file, copied all of the relevant rules into a style block inside the document and went to work removing extraneous tags and wording, to produce the documents here. After removing the <!- Foo -> I started adding in items, I added a width of 100% to both #div1 and #div2, that gave us the desired results of having the background color, but both of those divs were then to wide, by the size of the padding. We could correct that by assigning them the actual widths, as calculated by subtracting their right and left padding from the width of their parent, but that forced us to change the width in 3 places when we wanted to change the parents width.
As I removed the widths from the divs, I also removed the background-color from #div1, that gave us the interesting result of displaying the background-color for #div2, but still no bottom-border on the h2.
My next guess was to add in position:relative to all three elements wich finally solved all of our issues, with the one problem, of it being a lot of work to add that in to every css rule that could possibly be affected in the original document. With a last what if we moved the position:relative up to the enclosing form and that solved everything.form {
margin:0px;
padding:0px;
border:0px;
position:relative;
}Tags
Going technical again. You are welcome to change the channel.
Last night while poking around with the front of this blog I came across an error in the tags functionality. Typo paginates content to 10 articles per page, and that works when reading articles from the front page, reading a specific months posts and even while reading based on categories. Where it doesn’t work is when trying to access all of the articles in a specific tag. The link at the bottom of the tags page has ?page=2 while everywhere else it uses the /pages/2/ notation. I have taken a quick look at routes.rb but I didnt see anything that actually handles the tags. it looks like the tags are being handed off to index
map.connect 'articles',
:controller => 'articles', :action => 'index'
map.connect 'articles/page/:page',
:controller => 'articles', :action => 'index',
:page => /\d+/I have also verified that it doesnt work on other Typo sites. I need to look into more of how ROR works, before I could begin to fix this though.
Bug in iCal
I just pulled up iCal to check on a date. Notice the calendar —it is off by a month. It gives the correct dates for October, yet is labeled September. this is only in the small monthly view in the bottom left of the window. The main calendar has the dates correct.
Multiple Monitors
I got a new computer and monitor at work the other day, instead of getting rid of my old monitor, I am using it as a second monitor increasing my workspace. This is working great with one exception, when I move firefox to the second monitor, the menus continue to open at the far left side of the first monitor. This doesn’t happen all the time, so that when it does I restart firefox and go on my way with the menus displaying correctly.
