×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Doesn't work in IE9

Doesn't work in IE9 13 years 9 months ago #11741

  • Owen
  • Owen's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0
Hi Daniel,

Unfortunately for everyone, Microsoft has released a couple of days ago IE9 stable.
CompojoomComment is not working good with it at all.

1) When someone posts a comment it doesn't appear on the fly but, instead, only after the page is being refreshed.

2) If you have comments with pagination, the pagination don't work: you click on page 2, knowing there are more comments in page 2, but after you click on the comment pagination to go to page 2, no comments are displayed at all; just blank, not even the comments from the first page.
The above is what I've discovered so far. It is bound to become significant as more people will move to IE9 (which amazingly seems to me even wrose than IE7, because in IE7 and IE8 the comments at least worked well).

I hope you you can detect what caused these issues.

Regards,
Owen

Doesn't work in IE9 13 years 9 months ago #11744

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Shit, that doesn't sound good. Will do my best to provide a patch for 4.1.7 till Sunday.

Doesn't work in IE9 13 years 9 months ago #11750

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Owen,
Please try this. Go to components/com_comment/joscomment/jscripts/client.js and add at the end of the file this code:
if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment)
{
	Range.prototype.createContextualFragment = function(html)
	{
		var frag = document.createDocumentFragment(), 
		div = document.createElement("div");
		frag.appendChild(div);
		div.outerHTML = html;
		return frag;
	};
}

It seems that createContextualFragment is not working in IE9 - I'm not sure if this is a bug in IE9, but since this js function is supported in all other browsers such as chrome 10 and firefox 4 - I guess that something is again wrong on the microsoft front...

Doesn't work in IE9 13 years 9 months ago #11751

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
4.1.8 released - you can find it in the download section.
compojoom.com/downloads/downloads/compojoom-comment

Doesn't work in IE9 13 years 9 months ago #11752

  • Owen
  • Owen's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0
I added the code at the end of client.js.

In IE9: the pagination worked as they should.
The comments were posted, but immediately the page refreshes after each post - so that's still a problem in IE9 (especially
when you have videos that refresh on the page).
Something is causing the ajax not to function in this browser when it comes to posting comments.

In FF it worked fine.

In IE8 I thought it worked fine after I'd added the above code to client.js. However, I'm not sure if all is okay now in IE8 (as it was before) because after the change I had an instance where I posted a comment and it gave me a fail error message, and then in the window where I'd written the comment it said:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Method Not Implemented</title>
</head><body>
<h1>Method Not Implemented</h1>
<p>GET to /index.html not supported.<br />
</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

I've never encountered such message after posting a comment, so I think it might have caused some issues.

Yes, it's a shame MS insist to try to invent the wheel instead of conforming to the industry standards that work.
This time they've had to come out with a new proprietary js engine.
Someone should put IE out of its misery already.

Doesn't work in IE9 13 years 9 months ago #11753

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Pagination of course was something that I was so stupid not to test...
But actually both FF and IE should behave the same - means refresh of the page if you are not on the page where the comment should be shown.

To change this go to client.js line 207 and change it from
window.location = JOSC_linkToContent + sep + 'comment_id=' + id + '#josc' + id;
to
window.location = JOSC_linkToContent + '#josc' + id;

You can also comment the whole line... We've had the same problem with you in the past and this is going to change for real! The whole process of adding messages going to become nicer :)

I've tested 4.1.8 on IE8 and I didn't have any problems and you also should not have. The js code that we've added is only executed if the js function is not existing, but it is in IE8 - so it should behave as usual...
Daniel
P.S. When you make the changes don't forget to clear the cache!

Doesn't work in IE9 13 years 9 months ago #11754

  • Owen
  • Owen's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0
The pagination did work in IE9 after implementing your fix (before that they didn't work at all in IE9).
What didn't work after changing client.js was that in IE9 when you post a comment (and not to confuse, let's say there's
only one page of comments), so after you post a comment - the page automatically refreshed now, instead of acting as it always have in other browsers (post the comment on the page on the fly with no refresh).

So what you wrote now above about the need to change to:
window.location = JOSC_linkToContent + '#josc' + id;
Does that suppose to solve the issue I've indicated?

Doesn't work in IE9 13 years 9 months ago #11755

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Yep, the page won't be refreshed and the comment will be published on the same page. (which is not the last or first page with comments)
  • Page:
  • 1
Time to create page: 0.160 seconds