firefox problem: inserting images with wysiwyg not possible

Found a bug? Tell us!!
Post Reply
proberlin
Regular
Posts: 23
Joined: Wed Aug 02, 2006 8:59 pm
Location: Berlin, Germany

firefox problem: inserting images with wysiwyg not possible

Post by proberlin »

hi,

i am using firefox 1.5.0.6 and s9 version 1.0 and when i activate the wysiwyg-editor i can't insert images in the main textfield in static pages. when i click on "manage pictures" the popup opens and i can select a pic from the mediagallery, but when i click on "insert", the pic is not inserted into the page. it can be seen in the "intro-textfield", but it disappears completely, when i save the page.

i have enabled javascript in firefox. the javascript-console says:

"error: unknown attribute 'behavior'. deklaration ignored.
source: mywebsite/index.php?/serendipity_admin.css
line: 2"

does anybody else have this problem and can somebody help me? in internet explorer it works fine, but i hate ie...

peter
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: firefox problem: inserting images with wysiwyg not possi

Post by garvinhicking »

Hi!

I am at a loss. :( I can reproduce this in 1.0 (not in 1.1 nightlies).

But I don't know the reason! When I hit the "<>" Button to enter HTML View in the WYSIWYG editor I can see that no code is inserted there! But it appears in the frontend view.

Somehow the htmlarea control is not getting things.

I can edit the "serendipity_editor.js" file and at the buttom where it says:

Code: Select all

self.opener.editorref.surroundHTML(block, '');
I can add a

Code: Select all

alert(block);
and the HTML there is perfectly fine, like we always had it. But it doesn't get through properly.

I also don't know what the difference is from 1.0 and 1.1 in this respect. Dang, I'm really clueless. I'll try to reach some other experts and ask them if they have an idea.

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Isn't the "behavior" attribute from the IE-specific PNG stuff? Perhaps removing the browser-compatibility plugin will help.
Judebert
---
Website | Wishlist | PayPal
proberlin
Regular
Posts: 23
Joined: Wed Aug 02, 2006 8:59 pm
Location: Berlin, Germany

Post by proberlin »

i just removed the browser-compatibility plugin but that didn't help :(
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, I'm afraid that the PNG/behaviour thing is completely unrelated.

It's the HTMLArea that's going havoc here, and I can't reproduce it. It works in 1.1, but the code has not really changed since 1.0 in that regard. I'm quite at a loss, but also mailed some other experts and hope they might be able to help here! :(

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/
deadpoeticstar
Regular
Posts: 56
Joined: Tue Apr 18, 2006 3:10 pm

Post by deadpoeticstar »

since this is along the same lines as mine...is this only happening to PNG image files? cause the pic ive tried to post was a JPG
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Sadly not, the problem also happens with JPG images. I'm still investigating this. :)

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/
deadpoeticstar
Regular
Posts: 56
Joined: Tue Apr 18, 2006 3:10 pm

Post by deadpoeticstar »

well sorry to bust your bubble but the image i had problems with was a JPG and i have the same browser as the topic author
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes. That's what I wrote. The problem happens with PNG AND JPG. :-)

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/
deadpoeticstar
Regular
Posts: 56
Joined: Tue Apr 18, 2006 3:10 pm

Post by deadpoeticstar »

whoops my bad...sorry for the misunderstanding
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

No problem :)

Today I inspected the htmlarea.js file.

s9y addresses the function "surroundHTML" which looks like this:

Code: Select all

HTMLArea.prototype.surroundHTML = function(startTag, endTag) {
	var html = this.getSelectedHTML();
	// the following also deletes the selection
	this.insertHTML(startTag + html + endTag);
};
Now, if I add an alert(startTag) I will see that the right HTML code is shown there.

this.insertHTML also makes htmlarea show the image in its window. But if you switch to the HTML view (using the "<>" button), nothing is shown there. If you go back, the image will still be displayed. But because the HTML Content shows nothing, nothing will be saved.

Now the insertHTML function is a bit too complex for me to understand, but it seems as if it is not properly regenerating the input.

I am quite sure that it has worked in earlier versions of Firefox, so my thinking is that somethin in Firefox' JS model has recently changed, which makes htmlarea no longer properly work...maybe someone can help me do some google lookup and see, what has changed?

Maybe someone could also help in trying earlier firefox versions, to spot in which version the behavior has changed?

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/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

A quick report: Firefox 1.0.8 works, 1.5.0.1 does not work. There must be some change from 1.0.8 to 1.5 versions where Firefox has changed its JavaScript access model...

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/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Can you please try this: Before you insert an image, type 2 or 3 letters in your entry, and only then click on the image insertion. Does it now work?

(It does for me)

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I don't know if it works for other people, but I am once again impressed by your persistence and the effort you put into this free software. You inspire me to work harder.

I am humbled.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Judebert!

You are too kind :) In fact I was just probing the dark here - it's just that I find it annoying to face non-deterministic or non-reproducible errors anywhere. ;)

I was about to give up on this issue, so you should not feel TOO humbled. But again, any help is appreciated. You always put a smile on my face when I go on my morningly forum hunt, and see you helping so much on CSS/Formatting issues, also with all the verbose details you give people. :)

So, let's see this as a group effort. *g*

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/
Post Reply