News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

fetching preview...

Started by madra, December 24, 2010, 01:19:31 PM

Previous topic - Next topic

madra

i've been tweaking my forum a lot over the past few days, building my own theme. 

i've noticed this morning that previewing posts is no longer working .  the preview panel just endlessly displays the "fetching preview..." message. i thought at first i may have broken something but i've since tried it in a range of browsers and previewing is working perfectly in safari and google chrome.  it's broken in firefox and opera.

anyone got any idea what could be causing the preview function to only work on specific browsers?

Arantor


madra

hmmm... good suggestion.  i never thought to look in the javascript console  :-[

firefox gives me:

Error: junk after document element
File Source: http://appletalker.net/forum/index.php?action=post2 = board = 22; preview; xml
Line: 4, Column: 14
Source Code:
     </ script> <? xml version = "1.0" encoding = "UTF-8"?>


opera throws up:

JavaScript - http://appletalker.net/forum/index.php?action=post;msg=18316;topic=1908.0
Unknown thread
name: TypeError
message: Statement on line 70: Cannot convert undefined or null to Object
stacktrace: n/a; see  opera:config#UserPrefs|Exceptions Have Stacktrace


and on the browsers which are previewing properly, i get the following:

google chrome throws up an error which just flashes through the console for a split second and then disappears, after which the preview loads.  i had to do a screengrab of the error console, so i could write down what the error was:

Uncaught TypeError: Object false has no method 'getElementsByTagName' index.php:1090

safari gives me an error referring to an additional <head> tag which is appearing in the HTML code, when the page tries to load the preview and, sure enough, when i look in the source code, there it is.  looks like i've found a clue to follow!

Arantor

OK, so what you need to do is observe the preview action in something like Firebug, specifically observe the XMLHttpRequest being made and the exact response it's getting back - it seems to be receiving some extra junk in the response that shouldn't be there.

Advertisement: