×

Notice

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

TOPIC: links for 'quote' 'edit' 'delete' disappear when ajax disabled?

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 4 months ago #8075

  • carsten888
  • carsten888's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32
links for 'quote' 'edit' 'delete' disappear when ajax disabled?

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 4 months ago #8076

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Yep, I even think of dropping the option to disable the ajax functionality in future releases.

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 4 months ago #8078

  • carsten888
  • carsten888's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32
that would be a shame, because it is conflicting with another extension on my site and I can't find which one or how to solve that.

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 4 months ago #8099

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Why don't you report the problem you have with the extension? Most of the users those days are already used to ajax.

And supporting both ajax and non-ajax version is difficult.

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 4 months ago #8103

  • carsten888
  • carsten888's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32
hmmm. you're right.

Developers, developers, developers :)

yeah. that is me :)

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 3 months ago #8200

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
I'm curious to know what might be conflicting, from what I can see all the functions and prototypes are named fairly randomly but I guess we should prepend them all with JOSC or something... Firebug and Web Developer Toolbar would tell you of specific label conflicts / redeclarations / etc though.

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 3 months ago #8220

  • carsten888
  • carsten888's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32
these are the errors I get in firebug:


what goes wrong:
when click on edit (to edit your own post) the text gets loaded into the edit field, so far so good. Then when you save the changes 3 things can happen:
1. the changes get updated in the correct way. the old field gets refreshed with the new comment.
2. the text does not get refreshed, but when you reload the page the comment has changed.
3. the changed comment gets inserted as a new comment.

Any of those 3 things seems to happen randomly.

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 3 months ago #8221

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
So you get these errors when you have "AJAX Support" enabled? Are you using Firefox 3.5 (or later) or 3.0? Also, is it an original/unmodified modern template? These errors should not happen, something is breaking the HTML for JoomlaComment because it can't find the elements that should be there it seems.

Still, this code could be improved:

client.js
function JOSC_getPostClass(post)
{
    return post.getElementsByTagName('ul')[0].getElementsByTagName('li')[0].className;
}
 
function JOSC_setPostClass(post, value)
{
    post.getElementsByTagName('ul')[0].getElementsByTagName('li')[0].className = value;
}

...instead of using GetElementsByTagName we should use GetElementById and edit the template with id's accordingly. What do you think Daniel?

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 3 months ago #8222

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
EDIT: I think the template is damaged, it shouldn't be calling it with ul#post5143 as the parameter just post5143 without the ul# before it. I think. This suggests the modern template has been edited/damaged in your install...

links for 'quote' 'edit' 'delete' disappear when ajax disabled? 14 years 3 months ago #8242

  • carsten888
  • carsten888's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32
I reinstalled everything, default Joomla comment settings using template modern, css black.

On a fresh Joomla there is no problem, on another Joomla installation only the editting acts buggy (both on the same localhost-server).

The original post does not get refreshed most of the times, and sometimes the editted post is inserted as a new post.

No javascript errors in firebug, so I don't know how to debug this. I hope someone else knows, or else I will have to make a component-page just for editting comments. :dry:
  • Page:
  • 1
Time to create page: 0.163 seconds