Stupid programmer tricks
-
This is what the trac sequence shows and the comments between the dashes are what really happened.
http://trac.buddypress.org/ticket/504
Initial problem report in trac by me based on report in forums by oldskoo1
Ticket #504 (assigned defect)
css is broken in group forums using IE7
Reported by: burtadsit Owned by: burtadsit
Description
css is completely broken by something when viewing bp group forums page in RC-1. Forums user brought it up. testbp.org is broke. My dev server and linux server too. Only visiting the forums page in IE7. Firefox and Safari are OK.
Nothing else seems affected. Just any group’s forum pages.
(15 minutes later)
This happens only on the forums index page. Drill down into a topic and all is fine. What’s the diff? Looking.
(1 hr later)
Distracted by the frustration of not being able to find the problem I contribute a minor fix for something completely irrelevent to the problem at hand. Maybe if I fix everything else I won’t have to fix this.
While I was in there looking around I noticed this in /buddypress-member/groups/forum/topic.php line 68
<?php do_action( ‘groups_forum_new_topic_after’ ) ?>
Should be:
<?php do_action( ‘groups_forum_new_reply_after’ ) ?>
(2 hrs later) Light begins to dawn. It’s not css at all. What’s wrong with that? FF likes it just fine. I hate IE. Just google for some IE weirdness concerning <span> tags and I’m done.
It’s this:
<p><span class=”activity”><?php echo sprintf( ( ‘updated %s ago’, ‘buddypress’ ), bp_the_topic_time_since_last_post( false ) ) ?><span></p>
It blows the rest of the page in IE. Testing a fix.
(3 hrs later)
Same <p><span> sequence in the group home for active forum topics doesn’t get trashed. Why?
(6 hrs later)
Not done at all. Now very confused. Look deeper. 6 code editor windows open now. Source code strewn all over the floor. Ignoring the whole thing for a while hoping someone would see the forum posts, the trac ticket and maybe this will just disappear.
Well the fix is: “Remove the <p><span> activity line”. Works for me. It’s late and I have to get up early. I’ll revisit the IE nightmare tomorrow.
Or Andy could take pity on me and wave his magic IE knowledge wand and make it all go away by morning. One can always hope.
(Next morning)
I hate IE. Arrogant Microsofties. Can’t adhere to standards. Gotta be *special* don’t they? This still hasn’t gotten automagically fixed and my damn name is stuck on it. Try the ignore it and it will go away thing again.
I assigned this to me because I started working on it. However, anybody who comes up with the solution is more than welcome to take the credit. I gotta run til later this afternoon.
(That evening of the 2nd day)
Run the html validation utility on this damn thing again for the third time. IE keeps saying the same dumb stuff. It can’t even handle a <p><span> sequence.
(30 seconds after looking at the validation output and then the source again)
Fixed. <span> needed to be closed. Three hours of ignoring the html validation error messages that the span tag wasn’t closed finally led me to the inescapable and astounding conclusion that the span tag wasn’t closed.
* attachment closespan.patch added
(sigh) A total of 3-4 hrs of stupidity followed by 30 seconds of uncommon clarity. This is why Jr. Programmers aren’t paid much.
- The topic ‘Stupid programmer tricks’ is closed to new replies.