Author Topic: how to debug the JS/AJAX part?  (Read 3436 times)

Offline bakagaijin

  • Newbie
  • *
  • Posts: 4
how to debug the JS/AJAX part?
« on: May 12, 2015, 06:05:26 PM »
Hi,

I've been using roundcube... well, since ilohamail, but this recent update in debian I could not manage and I am in need of some help. Some of the functionality is broken with no trace of error messages in the apache or roundcube log, they are just simply not doing anything, so I'm presuming it is on the client side. Tried several browsers with no luck.

These features include:
* sending email (with no subject I can get as far as getting a messagebox about the empty subject and a progressbar of infinity)
* access to adressbook when composing a message (strangely it works when accessing the addressbook or trying to add an already existing contact from the message view; but not when composing a message/reply/forward. This includes the auto-complete in the To field as well)
* forwarding/replying an HTML message (only shown in plain text even though the drop-down shows html as format)

So, it would be really nice to get them working again. Any advice on how - and with what tools to start debugging the client side? Thanks for the help, if you want I can post stuff I find along the way.

(One thing I found that it was constantly logging about a not installed aspell, even though spellchecking was turned off everywhere I could find. I could get rid of the error message flood by installing aspell. Well, this was the only stuff which made to the apache log from roundcube.)

/Bakagaijin

Offline bakagaijin

  • Newbie
  • *
  • Posts: 4
Re: how to debug the JS/AJAX part?
« Reply #1 on: May 12, 2015, 06:54:38 PM »
OK,

it seems like whoever made the debian package, established a connection between tinymce and roundcube. However
* roundcube also pushes files on top of tinymce, so it's not a standard tinymce anymore as the package maintainer believed. But those are only style-sheets, so it should be ok-ish if only those were wrong.
* And worse: debian has a much older tinymce (3.4.8 Vs 4.1.9 which is packaged inside the 1.1.1 roundcube.tgz on the website), so it is not compatible on the file-level.

Hijacking the tinymce connection and overriding it with the contents of the tgz seems to solve the problems so far, i'll be testing a bit more later on.

Probably moving out roundcube-specific files from the tinymce-copy would be a nice touch though :).

As for aspell, I'll be needing some more time to find out why RC tries to run it all the time.

/Bakagaijin

Offline bakagaijin

  • Newbie
  • *
  • Posts: 4
Re: how to debug the JS/AJAX part?
« Reply #2 on: May 13, 2015, 07:39:00 PM »
One more on the same theme.

When reading a mail, the "Move" drop-down button does not work. In the browser console it logs: "TypeError: Argument 1 of Node.appendChild does not implement interface Node." in the jquery.min.js, line 5209 which is a rather unreadable file and this function is several pages long of this cramped stuff.

But it looks like a similar problem as above. The roundcube package links the libjs-jquery package, which is a bit older than in the roundcube.tgz (1.7.2 Vs 2.1.3). Removing the link and providing the packaged file helped. It seems that the package maintainer has good intentions, but the version dependencies are not set... or met.

/Bakagaijin




Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Re: how to debug the JS/AJAX part?
« Reply #3 on: May 14, 2015, 02:55:41 AM »
There is a Debian bug report about the tinyMCE stuff at least here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784351
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline bakagaijin

  • Newbie
  • *
  • Posts: 4
Re: how to debug the JS/AJAX part?
« Reply #4 on: May 14, 2015, 03:38:03 PM »
Thanks, I tried to get in contact with them regarding the libjs-query as well. (aspell is still on my todo list :) )