This error can also be caused by nested <form>
tag in the master page which is not allowed.
<form id="someid"></form>
This will likely be the cause if you have picked up a template and copying the code from somewhere as it.
You have to break the nesting of <form>
tag. The following should become
<form method="" name="form1">
<form method="" name="form2>
</form>
</form>
should become
<form method="" name="form1">
</form>
<form method="" name="form2>
</form>