Error: 'document.postmodify.attachmentPreview.value' is null or not an object

Started by x_m_b, September 24, 2004, 08:19:16 PM

Previous topic - Next topic

x_m_b

Thanks for the forum it is great!
Last week I migrated my forum from a Windows 2000 Advanced Server to a FreeBsd box.  I have gotten everything to work out and the forum seems to be running smooth.

On my development machine Windows 2000 IE6 I am getting an error everytime I preview a post.

---------------------------------------------
Line: 278
Char: 1
Error 'document.postmodify.attachmentPreview.value' is null or not an object
Code: 0
URL: hxxp:www.quitsendingmetrash.com/qsmtBoard/index.php?action=post2;start=0;board=1 [nonactive]
---------------------------------------------

I have a debugger installed on this machine and under IE6 Tools-InternetOptions-Advanced-Browsing I have   -Display a notification about every scipt error-   turned on. If I set this to off i do not get the error. I have tested the preview option on 2 other machines and it works fine.  The display error turned off on the other 2 machines. Submitting the post does not produce the error only the preveiw.

Is there a way I can prevent this error or should I just be happy it works when display errors is turned off?

Thanks in advance.  Not sure if you need any more info or not so let me know.

oh yeah,  I am fairly new to freeBsd and the whole unix area.  I read the installation and upgrade guides by Ben_S.  (great stuff!!)  I got through the chmoding of files and folders.  I am just curious if the upload_tmp_dir in the php.ini file may need to be chmoded for the preview to work if it is using this for temporary info.  Does the upload_tmp_dir even have anything to do with what I am talking about??

x_m_b

By the way I am able to preview the posts on this forum without error and I have my display all errors turned on.

[Unknown]

You may be using an older theme; if you are not, this has definitely been fixed in RC2. (although I seem to remember it being fixed before RC1...)

-[Unknown]

Owdy

What theme file has had this bug?
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0


Owdy

Classic theme based theme gives that error. I  put RC2 version post.template, now it gives document.postmodify.attachmentPreview has no properties when using preview. I dont see it, but other members reported that.  http://www.nakokulma.net/keskustelu/index.php
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

[Unknown]

Do you have this in there?

if (typeof(document.postmodify.attachmentPreview) == "undefined")
return;


-[Unknown]

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return (!document.postmodify.attachmentPreview.value || confirm(\'' . $txt['attach_lose'] . '\')) &amp;&amp; submitThisOnce(this);" accesskey="p" tabindex="4" />';

Is this right?

This error shows also in default theme. I can see it also.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

This is strange. This only happends in that forum. I have exact same default theme in my forum, and error isnt there. Very very strange :P.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

[Unknown]

Actually, if I say:

onclick="return true && true;"

That's perfectly fine.  But look, it's also fine to say:

onclick="return true &amp;&amp; true;"

Remember that entities are parsed inside attributes by browsers.

-[Unknown]

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Tony Reid

I have just searched on a runtime error and found this post is quite similar - to an issue Im having with a couple of my users.

Im using the classic theme with RC2 and this is what they are seeing when they preview...

Quotea "runtime error has occurred."
Do youwish to debug?
Line 363
Error document postmodify attachment
Preview value is null or not an object.

Any ideas?
Tony Reid

[Unknown]

Do you have this line in your classic theme's Post template?

if (typeof(document.postmodify.attachmentPreview) == "undefined")

-[Unknown]

Tony Reid

Hi,

Thanks for getting back to me....

Yes its there  -  incased in the function updateAttachmentCache()

Tony,

Tony Reid

Tony Reid

Tony Reid

Advertisement: