TinyPortal

Development => Support => Topic started by: Sek on January 16, 2007, 02:28:20 PM

Title: Preview bug
Post by: Sek on January 16, 2007, 02:28:20 PM
I've posted this over at SMF and have received no response.

I'm using SMF v1.1.1 and TP v0.9.7.

When using the New topic and reply options and then use the preview feature, it just says Fetching Preview and never shows the actual preview. However when I use the quick reply area the preview options works fine. Anyone have any ideas on how to fix this?
Title: Re: Preview bug
Post by: husmen73 on January 16, 2007, 02:38:00 PM
Which theme you useing?

These files upload again.
post.template.php, display.template.php, display.php, post.php
Title: Re: Preview bug
Post by: Sek on January 17, 2007, 04:29:49 AM
Well.. about 10 different ones and all act the same way. All say fetching preview with in the new topic and reply when you select preview... and work fine in the quick reply area.

and I have tried uploading the files again to no avail.

I do thank you for your response :)
Title: Re: Preview bug
Post by: G6Cad on January 17, 2007, 06:41:14 AM
Could be that your host doesent support images.
make sure you have GDlibrary installed on the server, or it will be a bit hard to get your preview to work as the GDlibabry must prosess the images
Title: Re: Preview bug
Post by: samson on January 17, 2007, 10:38:41 AM
I have the same problem I'm using the Day Of Defeat theme the spelling check pop up works fine but no preview cant remember when it started it used to work I must of lost it after an update
Title: Re: Preview bug
Post by: G6Cad on January 17, 2007, 10:57:58 AM
Just read back on some info on SMF forums. (this is actually their support part as the spell checker are their coding and not TPs )
Anywhay, there seem to be issues with UTF8 and regular language selection for the spellchecker on some hosts.

In one of the threads one of the mods said that the members that had issues with this should contact the host and ask them to update the selection for diffrent language standards, including utf8
So try and see if you can get som help with this from the host, cause it seems like it is a host issue more then anything.

You can search on SMF forums if you need to know more about this.
Title: Re: Preview bug
Post by: bloc on January 17, 2007, 11:26:46 AM
Any mods installed? Especially in the posting area?
Title: Re: Preview bug
Post by: Sek on January 17, 2007, 11:57:42 AM
Well this was/is an issue out of the box with the preview option and not the spell checker as the spell checker works fine.. We noticed this from the start before we added any mods. Only the preview post option in the new topic and reply topic don't work. Just curious here.. if it works in the quick reply area why not the new topic and reply? If it was a problem on the host end technicaly none of it should work right>? 
And thanks for the help here guys As I stated earlier I've posted on the smf forums and tried things stated in other posts there with little reply.

wow names and treasury are the only mods installed however but as I said.. this was a problem before we install these mods..
Title: Re: Preview bug
Post by: bloc on January 18, 2007, 12:48:01 PM
Well, the quick-reply use Display.template, while reply/new topic use Post.template. So it might be some missing javascript in the Post.template.
Title: Re: Preview bug
Post by: knat on January 18, 2007, 06:13:57 PM
I have the same problem using SMF 1.1 RC 3... Preview works for PM but not for New posts and replies.. I too think it might be something with the java  :-\
Title: Re: Preview bug
Post by: Sek on January 19, 2007, 02:54:39 AM
Quote from: Bloc on January 18, 2007, 12:48:01 PM
Well, the quick-reply use Display.template, while reply/new topic use Post.template. So it might be some missing javascript in the Post.template.

Thanks for the info Bloc I'lll grab an older version of smf and compare those files.. see if I can come up with anything in the code thats different.
Title: Re: Preview bug
Post by: bloc on January 19, 2007, 11:01:17 AM
I suggest just uploading all the original files again..and rather put in any mods/chnages aferwards. Only way to be sure.
Title: Re: Preview bug
Post by: knat on January 26, 2007, 07:48:33 AM
Please can anyone help me solve this very wierd problem

My preview works fine in Firefox

But in IE7 it gives the error below.

I tried using a fresh post.template.php file but it didnt solve the problem.

In PM preview works fine on both Firefox and IE7 - So its only a problem when posting

What can be the problem ? and what file is the error message talking about ?

Error Message:

Line: 527
Char: 12
Error: 'GetElementsByTagName{...}.0' is null or not an object
Code: 0
URL: http://www.gapeindex.dk/index.php?action=post;msg=3473;topic=2712.0;sesc=f74357fcfb04a2fde30647135bb8cce0


Edit: Just tested with IE6, and i get same error - OMG i dont want to ask all my members to switch to Firefox LoL  ;D
Title: Re: Preview bug
Post by: IchBin on January 26, 2007, 02:07:06 PM
Quote from: knat on January 26, 2007, 07:48:33 AMOMG i dont want to ask all my members to switch to Firefox LoL  ;D

I don't see that as being such a bad thing. :D

Does this happen in all themes you have or only the current one you're using?
Title: Re: Preview bug
Post by: bloc on January 26, 2007, 06:00:22 PM
Its javascript error, and I think its trying to refrence a object by its id which isn't defined.

Something is definitive up with the javascript. Have you added some extra javascript in your theme? Or is it a theme that has that added..?
Title: Re: Preview bug
Post by: knat on January 26, 2007, 06:17:10 PM
i have added so many thinks lol i cant remember.. but yeah i have a few things running from dynamicdrive.com.. will try turning them off and see what happens  ::)
Title: Re: Preview bug
Post by: bloc on January 26, 2007, 06:26:24 PM
;D dynamicdrive is a great source, but unfortunelately its also very easy to get the javascripts clashing with each other. :P
Title: Re: Preview bug
Post by: AndyII on June 17, 2007, 08:42:56 PM
GetElementsByTagName is the js error,
Fetching Preview is all thats shown

I have tried using the above listed files as a test, but still there, This did work (98% sure) before TP was installed.
I too have searched SMF and here, so still need a fix
using
SMF 1.1.2
Scribbles - theme
TinyPortal v0.9.8
no other mods
Title: Re: Preview bug
Post by: AndyII on June 17, 2007, 11:09:14 PM
ok, it is SMF, in Post.template.php

var i, preview = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("preview")[0];
        setInnerHTML(document.getElementById("preview_subject"), preview.getElementsByTagName("subject")[0].firstChild.nodeValue);

with
var i, preview = XMLDoc.getElementsByTagName("smf")[0], XMLDoc.getElementsByTagName("preview")[0];
        setInnerHTML(document.getElementById("preview_subject"), preview.getElementsByTagName("subject")[0].firstChild.nodeValue);
Title: Re: Preview bug
Post by: knat on June 18, 2007, 04:17:38 AM
Thanks a lot Andy - My preview button is working again  :)

Edit: Ohhh buggers !  :P

Making this change creates a new bug.. you know that when you select a topic icon you can see a preview of that icon.. that stops working when i make this change to fix the preview bug... can you help me with this ?  :)
Title: Re: Preview bug
Post by: me123 on January 15, 2008, 06:16:09 PM
Is there a solution already? I have the same problem...
Title: Re: Preview bug
Post by: me123 on January 15, 2008, 09:20:44 PM
OK guys, I found the answer:

This is usually related to extra line breaks before the doc declaration.  Look at the html source and see if you have any lines before the "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">".  IF you do check Modifications.english.php and Source files for lines after or before the <?php ?>.

In my case the modifications.dutch.php contained a line break halfway the file...
So far, my forum is error free again...  8)