News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Fetching preview... problem

Started by EleFunkie, July 14, 2008, 02:14:35 PM

Previous topic - Next topic

EleFunkie

Hello People,

I have a problem while posting a topic, or answering a reply.

Whenever I try to write something and hit the "preview", the Preview post, stucks at "Fetching preview..." and doesn't show the preview.

Does anyone know what should I do to get this fixed?

Thanks in advance

SlammedDime

Can you post a link to your site?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

EleFunkie

sure, of course; hxxp:www.xbox360forumcy.com [nonactive]

Though, what could the problem be? - I mean on what file possibly?

SlammedDime

Looks like there is an extra space at the top of one of your php files.  It could be any of them unfortunately, but I'd start with index.php, then any files you've manually modified.  <?php must be the very first line of every php file.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

EleFunkie

hmm... can't think of any changes in the files... :(

But I'll try and search, any other ideas?

SlammedDime

Nope, that's pretty much it.  Might as well check the ends of the files too.  If there are any extra lines after ?> in any files, that could cause problems too, depending on the file.  I can see the extra space in the HTML source of your pages, so it does exist, and I'm almost positive that is the source of the problem.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

EleFunkie

#6
where exactly is this extra space? - do you mean the space in the .css?

Also, I'm thinking of this: which file is associated with the "Preview" button?

on the view source - I see this:

// Show the preview section.
772 var i, preview = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("preview")[0];
773 setInnerHTML(document.getElementById("preview_subject"), preview.getElementsByTagName("subject")[0].firstChild.nodeValue);
774
775 var bodyText = "";
776 for (i = 0; i < preview.getElementsByTagName("body")[0].childNodes.length; i++)
777 bodyText += preview.getElementsByTagName("body")[0].childNodes.nodeValue;
778
779 setInnerHTML(document.getElementById("preview_body"), bodyText);
780 document.getElementById("preview_body").className = "post";


I also get this:

XMLDoc.getElementsByTagName("smf")[0] has no properties
onDocSent(Document )index.php (line 772)
onreadystatechange()script.js (line 60)
[Break on this error] var i, preview = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName(...

Anyone sees anything wrong in the coding?

SlammedDime

Open any page of your website and look at the HTML source.  There is an extra space at the top before <DOCTYPE.  That extra space is either in one of your language files, index.template.php, or index.php (that I can think of anyway).  That is what is messing things up.

If you really can't find it, PM me FTP login info for your site and I'll take a look.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

EleFunkie

I''ve looked everywhere! - nothing!

I'm sending you now the FTP info, man if you find what's wrong with it - I'll be totally grateful!  :)

SlammedDime

Got it.  It was in the TPModules.php file.

You should be good to go now.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

EleFunkie

SlimmedDime, you the man!  :D

Thanks a billion!

Advertisement: