Anthony1994 Posted June 30, 2011 Share Posted June 30, 2011 I have the script: http://pastie.org/private/1stlhb73iduiztx98ybhkw I'm trying to upload it to Blogger as html....but instead I keep receiving this error. We were unable to save your template Please correct the error below and submit your template again. Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. XML error message: The element type "script" must be terminated by the matching end-tag "". Could anyone tell me what I have to do, to fix this error? Thanks for taking the time to read my problem Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/ Share on other sites More sharing options...
EdwinPaul Posted June 30, 2011 Share Posted June 30, 2011 On line 8 it says: <script type="text/javascript"> Normally, that is the beginning of a piece of script (mostly Javascript) in another language. The end of such a script must be: </script> If not, you get an error like you did. Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1236796 Share on other sites More sharing options...
Anthony1994 Posted July 1, 2011 Author Share Posted July 1, 2011 Where do I put </script> ??? Like, what line? Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1237081 Share on other sites More sharing options...
mikesta707 Posted July 1, 2011 Share Posted July 1, 2011 I took the liberty of pasting the relevant code here, so its a little bit easier to reference the problem <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <meta property="og:title" content="[TEXT]"> <meta property="og:url" content="http://[YOURURL].blogspot.com/"> <meta property="og:image" content="[FB IMAGE]"> <meta property="og:site_name" content=""> <meta property="og:description" content="[TEXT 2]"> The error is here:<script type="text/javascript"> <!-- You never close this tag. There isn't even any javascript here. I'm not sure why you even have this opening javascript tag, since you aren't including any separate source code files here. Two seperate fixes below --> <style type="text/css">body{font-family:"Lucida Grande", Tahwitoma;font-size:11px;}p{margin:0;padding:0;}a{color:#3b5998; cursor:pointer;}a:hover{text-decoration:underline;}a.viewmore{display:block;height:29px;border:1px solid #d8dfea;background-color:#edeff4;text-align:center;line-height:29px;}a.viewmore:hover{background-color:#d8dfea;}</style><link rel="openid.server" href="http://www.blogger.com/openid-server.g" /> <!-- --><style type="text/css">@import url(http://www.blogger.com/static/v1/v-css/navbar/697174003-classic.css); div.b-mobile {display:none;} </style> </head> ... rest of code the error is highlighted and explained. Two fixes below <script type="text/javascript"></script> That adds the closing tag after the opening tag. Kind of dumb though because there is no javascript code, so you might as well just take out that script tag entirely. Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1237084 Share on other sites More sharing options...
Anthony1994 Posted July 1, 2011 Author Share Posted July 1, 2011 I tried adding the </script> tag directly after it, AND deleting <script type="text/javascript"> all together and the same error; We were unable to save your template Please correct the error below and submit your template again. Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. XML error message: The element type "meta" must be terminated by the matching end-tag "". Comes up Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1237085 Share on other sites More sharing options...
mikesta707 Posted July 1, 2011 Share Posted July 1, 2011 Thats a different error from your first one. Notice The element type "meta" must be terminated by the matching end-tag "". In your OP, the element type was "script". It seems you have a bunch of meta tags that are unclosed too. Now they seem fine to me for most normal pages, but the XML parser you are uploading or whatever that file to may only accept strict xhtml. so you may have to use self closing tag syntax. Self closing syntax is akin to the following <img src="someImage.jpg" /> notice the forward slash before the closing >. For your code, there seem to be many meta tags missing this. The first one should look like <meta property="og:title" content="[TEXT]" /> I can't really guarantee this will work because I haven't really looked through the rest of your code. You may have invalid HTML elsewhere. The error messages are pretty descriptive though. The element type "meta" must be terminated by the matching end-tag "". Element type refers to the tag. So when it says element type "meta" its referring to meta tags. If it were to say for example, element type "img" it would be referring to the img tags. The rest is pretty self explanatory. Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1237087 Share on other sites More sharing options...
Anthony1994 Posted July 1, 2011 Author Share Posted July 1, 2011 Thanks for your help I think that fixed one issue but now I have this one: "We were unable to save your template Please correct the error below and submit your template again. Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. XML error message: The element type "html" must be terminated by the matching end-tag ""." Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1237101 Share on other sites More sharing options...
mikesta707 Posted July 1, 2011 Share Posted July 1, 2011 That means you are missing an ending </html> tag which should be at the end of your script Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1237126 Share on other sites More sharing options...
Anthony1994 Posted July 1, 2011 Author Share Posted July 1, 2011 Adding a </html> at the very end results in the same error msg. Quote Link to comment https://forums.phpfreaks.com/topic/240795-simple-facebook-script-error/#findComment-1237128 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.