photoblog plugin javascript error in Firefox

Creating and modifying plugins.
Post Reply
ultravox
Regular
Posts: 9
Joined: Fri Jul 15, 2005 8:17 pm
Location: Minneapolis, MN
Contact:

photoblog plugin javascript error in Firefox

Post by ultravox »

The photoblog plugin throws this javascript error in Firefox when you click the Done button while adding a photo:

Error: document.getElementById(el).onchange is not a function
Source File: http://timf.anansi-web.com/serendipity/ ... _editor.js
Line: 142

It does insert the photo, but will not insert the thumbnail. This does work in IE and a quick Google shows me that there are problems with the getElementById function in Firefox, but I'm not a JS programmer and can't figure out how to fix it.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: photoblog plugin javascript error in Firefox

Post by garvinhicking »

You cou please edit your serendipity_editor.js file and change

Code: Select all

        document.getElementById(el).onchange();
to

Code: Select all

    if (document.getElementById(el).onchange) {
        document.getElementById(el).onchange();
    }
and see if that works?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ultravox
Regular
Posts: 9
Joined: Fri Jul 15, 2005 8:17 pm
Location: Minneapolis, MN
Contact:

Post by ultravox »

Okay, I tried that. But I still get the same error.

Got another suggestion?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Did you clear your browser's cache? Otherwise it can be that it still uses the old .js file.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ultravox
Regular
Posts: 9
Joined: Fri Jul 15, 2005 8:17 pm
Location: Minneapolis, MN
Contact:

Post by ultravox »

Oops. Don't I feel dumb?

Okay, I cleared the cache and the error went away. I click on the 'Done' button and the window closes.

But now there is another problem. When I select the radio button to use the thumbnail in my entry, it inserts a path like this into the photoblog field for the entry: /serendipity/uploads/photoblog/tiny_tim.serendipityThumb.jpg

So it looks like it should use the thumbnail image.

But when I view the blog entry, it uses the full size image.

This is not really a problem for me, as I don't want the thumbnails in my entries, but it seems like odd behavior.
Post Reply