Showing posts with label blogger bug. Show all posts
Showing posts with label blogger bug. Show all posts

Blogger's Word Verification form gets Cut Off

The Bug


When 'Comment Form Placement' is set to 'Embedded below post' the Word Verification portion of the comment submission form gets cut off and left partially undisplayed, making it difficult for users to leave comments.

This seems to be a problem in some of the default templates provided by Blogger (including the 'Rounders' templates) where the height of the area containing the comment form has been rigidly set, in my own case to 275px. This is enough to encapsulate the comment submission area, but not enough to accomodate the 'Word Verification' form. (aka: The Captcha.)

Workaround


Warning: You may wish to backup your current template before attempting these changes.

Click the Layout tab in your Blogger dashboard, then click the 'Edit HTML' option. Under the 'Edit Template' section click the 'Expand Widget Templates' checkbox. Press CTRL+F to open your browser's 'Find' dialogue and enter the text below:

blogger-comment-from-post


Hit Enter and your browser should locate and highlight the first instance of that text on the page. If all is well you should be looking at this block of text:

<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='275px' id='comment-editor' name='comment-editor' scrolling='no' src='' width='100%'/>


The problem is in the "height='275px'" portion. 275 pixels is not enough space. I recommend you change the height value to 420px. This should be just enough space for the comment field and the Word Verification form to expand into. Once you've set the height value, click the "Save Template" button and you're done.

Blogger Bug - Internal Links Rewritten by the Composer

The best way to link to your own articles on Blogger is - or should be - with an internal link. Instead of using the full address to an article ("http://myblog.blogspot.com/2009/05/my-article.html") we should prefer an ambiguous internal link ("/2009/05/my-article.html")

Using an internal link means that if I decide to change the namespace of my blog at some point in the future the link will remain valid, since it only ever specified the subdirectory paths. This is especially important if you are using a domain name with your blogspot site, as you may in the future cease to own the domain. If you were to specify the full address in your links they will all break and become invalid if and when you let your domain lease run out.

The Bug


Entering Compose mode in Blogger's text editor resolves and rewrites all ambiguous links as children of www.blogger.com, thereby breaking them.

Example


Starting in the Compose window I click the Link button. In the URL field I enter the following ambiguous, internal link:

/2009/05/my-article.html


If I switch into the Edit Html mode my link is still properly preserved and displays the HTML code:

<a href="/2009/05/my-article.html">Visit My Article<a>


However, if I switch back into the Compose window - though I cannot see it yet - in the background my link has been resolved and specified. The HTML now reads:

<a href="http://www.blogger.com/2009/05/my-article.html">Visit My Article<a>


Not only has this negated the purpose of the ambiguous link - which is to maintain site integrity across changes in the domain name - but it has broken the link by resolving it to www.blogger.com instead of our blogspot site.

Even worse: Because the trigger here is simply entering into the Compose mode, if you merely attempt to edit or update an article containing ambiguous links, and if the editor opens into the Compose mode by default, then it will have already broken all internal links on the page just by reopening the post. If you save this reopened post you will have corrupted all your links.

Workaround


The only solution here is to never, ever use Compose mode. Switch into the Edit Html interface and get comfy. It's not much of a workaround, I know, but it's the only "solution" I've found.

I had hopes of finding a different access method that would allow linking to blogspot sites by blogID and postID. Alas I can find no record of the proper method for this and spamming the likely implementations hasn't gotten me anywhere, either.

For now, those concerned with using and maintaining ambiguous links will want to make sure the Settings>Formatting> option "Convert line breaks" is set to Yes and relegate themselves to the Edit Html interface. It's probably not a bad idea in any circumstance, as this is surely not the only bug in the Composer.

Blogger Bug - Corrupted Javascript for() loops

The Bug


Twice, when I have had call to write a javascript implementation for a blogspot page I have found that everything beneath the first line of a for() loop is chewed up, garbled, and spit back out upon saving it. Blogger doesn't throw an error of any kind, it just saves your code to the gadget, having silently mutated and destroyed what was written. This is observed by simply returning to the gadget via the edit button. There the code will be corrupt.


Example


<script type="text/javascript">

function addPlayers() {
var allmp3s = document.getElementsByName('mp3');
for (i=0;i<allmp3s.length;i++){
var mp3Player = buildEmbed(allmp3s[i]);
allmp3s[i].insertBefore(document.createElement('br'), allmp3s[i].firstChild);
allmp3s[i].insertBefore(mp3Player, allmp3s[i].firstChild);
}
}
</script>


Paste the code above into an HTML/Javascript gadget and save it. Now click edit to return to the code. Others have confirmed that as of this post's date blogspot corrupts it like so:

<script type="text/javascript">
function addPlayers() {
var allmp3s = document.getElementsByName('mp3');
for (i=0;i<allmp3s.length;i++){
}
}
mp3player="buildEmbed(allmp3s[i]);
" br var allmp3s[i].firstchild);
allmp3s[i].insertbefore(document.createelement( ),
allmp3s[i].insertbefore(mp3player,></script>


Workaround


Simply use another type of loop. A while() loop and a counter variable can be used to do accomplish the same results your for() loop might have. I haven't observed Blogger to corrupt while() loops.