Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

recaptcha shows only on static page

Go to End

5 Posts   784 Views


Community Member, 10 Posts

24 November 2011 at 8:32am


I am using the recatcha module together with the spamprotector module in SilverStripe 2.4.5.
The recaptcha field ends up in the in the html code, but the browser (Safari and Firefox alike) does not display it.
The strangest thing is, when I save the page to the disk and load it into the browser from there, the browser displays the field.

Does anyone have an explanation for this behaviour and an idea how to fix that?

Best Regards,



Community Member, 10 Posts

25 November 2011 at 6:52am

I can explain the strange behavior:
I saved the page with the suffix .htm to the disk. When I load it from the disk, the suffix overrides the xhtml declaration.
So the recaptcha is not displayed because it doesn't validate.
I will fiddle with a validator and see if I can come up with a fix.

Best regards,



Community Member, 10 Posts

25 November 2011 at 8:27am

The validator reveals various errors, but when they are fixed the recaptcha field still does not show in Safari or Firefox.
I have tried the HTML 4.01 doctype in, but then the entire page does not show, just an error message.

I don't know anything else to try. For me, the recaptcha module just does not work.
And without that, SilverStripe just does not work for me.

Any hints are appreciated.
Best regards,



Forum Moderator, 5523 Posts

25 November 2011 at 9:13pm

What is the error message? try validating your HTML and see if any issues crop up.


Community Member, 10 Posts

26 November 2011 at 6:22am

Edited: 26/11/2011 6:23am


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

The error message is:

This page contains the following errors:
error on line 31 at column 8: Opening and ending tag mismatch: base line 0 and head
Below is a rendering of the page up to the first error.

The cause appears to be this line:

<base href="http://mysite/"><!--[if lte IE 6]></base><![endif]-->

which is inserted by this control:

<% base_tag %>

The <base>-tag is closed only if the browser version is less than IE6, which means it's no closed for most browsers, right?

With the xhtml DOCTYPE this control returns:

<base href="http://mysite/" />

which of course validates well.

Thanks for your help,