Archive for the ‘Uncategorized’ Category
Blank page after a quick reply (vBulletin)
While launching the Google Adsense on Gameplay and its forum (vBulletin 3.8) we ran into a strange issue while posting quick reply messages to the forum with Firefox. After hitting submit the page turned blank although the comment was apparently posted.
We have integrated our Adsense code into the postbit vBulletin template after the last post on the page using this syntax:
<if condition="$post['islastshown']"> Adsense code here. </if>
The problem happend because Quick Reply uses asynchronous javascript to submit the reply and render the new reply at the and of the page. Since we are embedding the Adsense code if the post is “last shown” this renderd the Google Adsense code twice and FF “broke”.
The fix is quite simple, you just have to check if the post is being sent as a response to the asynchronous request, so the new and working code looks like this:
<if condition="$post['islastshown'] AND !$GLOBALS['vbulletin']->GPC['ajax']"> Adsense code here. </if>
Of course this is not the only case which causes vBulletin forum to render a blank page. For a list of other possible reasons take a look at this chapter in the official documentation.
If you are interested you can also take a look at this exhaustive list of conditionals which you can use in your vBulletin templates.
Google confused with 301 redirects
It has been almost I year since we launched nacional.hr. During the migration from the old content management we thoroughly went through the whole system and made sure that all the old URIs are still working. Although cool URIs don’t change sometimes you have no choice and that was the case with this site. We had to enhance some of the URIs for SEO purpose and some of them were just clashing with our URI scheme it we did not want to maintain a large list of legacy URIs in our rewrite rules.
We hooked a legacy URI “plugin” in our error controller so that checking for old URIs does not interfere with the loading times of our system unless really necessary and created 301 (permanent) redirects to our new URI scheme patted ourselves on the back an forgot all about it until recently.
While checking the access logs for some unusual traffic spikes we where getting we noticed that Google stills checks our old category URIs and follows the redirects that we have created. The most unusual things was that the URIs where checked very often. Links to our news category pages where crawled by Google a couple of times a minute during the course of couple of days. To add to the confusion the categories that are most often crawled our the ones that list articles from our print issue which get updated once a week, the ones that are updated many times a day get crawled at a regular pace.
Any ideas what could cause something like this?
Hello World!
Every nice blog should start with a “Hello World!”. Right?