Hi, I just tried out this module and I couldn't get it to work.

I get a non-JS interface for the voting and when I vote from the drop-down list, I get a "Communication error" message which then disappears.

I have the latest version of jquery installed and other modules are functioning fine.

Attached is an image of the three stages.

CommentFileSizeAuthor
#2 indexes.gif9.6 KBbobdalob
sk.JPG4.42 KBbobdalob

Comments

mercmobily’s picture

The first bug report!
OK, one thing at a time.
First of all, you say that you get a "non-javascript interface". However, the fact that you get a "communication error" after the vote tells me that you are actually getting the JS interface (which looks the same as the NON-JS one, but without the button to vote).
Can you confirm that?

Second, can you please send me BOTH the error_log and the access_log from your server WHEN you vote?

Basically, you should never get the communication error... I need more info to work out what is going on. One thing is certain: the module is puking...

Jake: do you have any more ideas?

Bye!

Merc.

bobdalob’s picture

StatusFileSize
new9.6 KB

Nice, I write a good reply and drupal logs me out and loses it.

Hello and sorry to be the first!

1. To confirm, and bear in mind I am not familiar with the fully working module, it appears to me as if the actual voting interface I am seeing is non-javascript (see leftmost of 1st attached image) whereas upon voting the error message appears and disappears with javascript (btw the error message disappears completely except for in opera - as in the right-most of the 1st attached). Question: part 5 of the install guide - where precisely should this code go? it makes no difference to this issue where I put it or if at all!

2. As for the logs you request, there are no entries that pertain to the simple karma module. The simple_karma table exists in the database however the fields are empty. There is a message "PRIMARY and INDEX keys should not both be set for column `uid`". See attached image.

FYI This is installed on a testing server. The site is pretty clean and one that I frequently restore from backup. I have no other issues with it or jquery. I have tried disabling, but not uninstalling, other non-core modules to no effect.

If I've missed something, please tell me. Please feel free to come back to me as and when necessary - I can usually get back to you within a few hours if not much sooner.

cowboystyle’s picture

This version of Simple Karma has only been tested with jQuery 1.1.2, it is untested with the latest 1.1.3 / 1.1.3.1 versions of jQuery, I'll take a look at this tonight (GMT -5) and see if the new version of jQuery is the issue.

bobdalob’s picture

I can confirm that this is with jquery version 1.1.2 and subsequently tested with version 1.1.3

mercmobily’s picture

Hi,

Just to clarify: bobdalob, you are having problems with JQuery 1.1.2, right?

Merc.

bobdalob’s picture

either version. originally and upon install of this module i had 1.1.2 then I tried the latest release and then I went back to 1.1.2

whichever version of jQuery the problem is the same

mercmobily’s picture

Hi,

This is really strange.
Can I ask you to *please* check and double-check BOTH the error-log and the access-log when you vote?
I didn't ask for the error-log before... please make 10000% sure that you are indeed looking at the right log file, OK?
(I don't mean to be a pain, but I make this mistake myself sometimes...)

Thanks!

Merc.

bobdalob’s picture

Hooray - error found!

My confusion as to which logs - I checked the apache server logs for the first time - I'm sorry about that!

[Tue Jul 10 10:35:51 2007] [error] [client 127.0.0.1] File does not exist: W:/www/simple_karma, referer: http://localhost/testone/node/40

So that suggests it's looking in the wrong place, right?

BTW: I'm running Universal Server which creates a virtual drive W. On this install I place modules in the modules dir although I normally like to have them in a separate dir.

Also, only standard access entries in the database accesslog

mercmobily’s picture

Hi,

Hummmm it looks like there is a bit of a configuration issue with your Drupal.

@bobdalob: can you please describe to us how you installed Drupal exactly etc.? I don't know how WIndows works, and I am not sure what the "universal server" is. And, the last time I dealt with "drives" was something like 11 years ago...

@jake: with this new information, would you be able to guess why the JS would request a file to W:/www/simple_karma ...?

Merc,

bobdalob’s picture

Universal Server is a package that combines Apache/PHP/MySQL and allows a much simpler setup on Windows machines. Some packages are better than others - I've never had any trouble with this one but of course that is not to say it is not an error on its side. At the least it is something that is lost in translation between the two and if it is only this and you've have no other reports then it is nothing to be concerned about. I only hope I have not taken too much of your attention in looking at this, and I thank you for your prompt attention. I am doubting it is something specific to my Drupal config however I shall try and upload at some point to confirm that all is well. Thanks again.

mercmobily’s picture

Hi,

I am actually intrigued by this bug.
Can you please post the complete source code for the HTML page with the voting?
This line just doesn't make sense:

[Tue Jul 10 10:35:51 2007] [error] [client 127.0.0.1] File does not exist: W:/www/simple_karma, referer: http://localhost/testone/node/40

The javascript really should be asking for simple_karma/handle...!

Puzzling.

Merc.

bobdalob’s picture

The simple karma code from a sample node (say that quickly):

<style type="text/css" media="all">@import "/testone/modules/simple_karma/simple_karma.css";</style>

<script type="text/javascript" src="/testone/modules/simple_karma/simple_karma.js"></script>

<li class="last simple_karma"><span class="simple_karma"><form action="/simple_karma/handle" method="get">
   <span class="karma">
     karma
     <select name="karma_vote">
       <option value="4" >4</option><option value="3" >3</option><option value="2" >2</option><option value="1" >1</option><option value="0"  selected >0</option><option value="-1" >-1</option><option value="-2" >-2</option><option value="-3" >-3</option><option value="-4" >-4</option>;
     </select>
     <input type="hidden" name="oid" value="73"/>
     <input type="hidden" name="otype" value="n"/>
     <input type="submit" name="form_type" value="form"/>
   </span>
</form> </span></li>

And to repeat, the server error:

[Wed Jul 11 20:04:04 2007] [error] [client 127.0.0.1] File does not exist: W:/www/simple_karma, referer: http://localhost/testone/node/73

However I got curious and installed the simple karma module onto some shared hosting space - not onto a fresh drupal install but one from which the testing site would have originated - and there is no problem. I don't think there has been any significant changes to suggest it was the drupal config. Without digesting this module's code, I'd put it down to the first limitation of this server utility that I've found. I have read similar packages sometimes have little shown glitches which can often confuse a user because he/she is assuming it's something else!

bobdalob’s picture

Title: Communication error & no AJAX voting » Communication error

Changed title as AJAX voting IS working - just not my understanding of how the module was meant to appear when I first posted!

mercmobily’s picture

Hi,

OK. Look, unless Jake has some amazing idea on why this is, and we can get if fixed, I would close the bug...
At least, it will be here for people wanting to know why this module doesn't work with "Universal Server", for unidentified reasons!

Bye,

Merc.

cowboystyle’s picture

I'd say close it, the requesting page is using standard jQuery AJAX calls, this looks like a platform issue.

mercmobily’s picture

Status: Active » Closed (fixed)
sinthetek’s picture

I've been having this problem as well. For some reason the module seems to be looking for it's dir (simple_karma/) in drupal's root rather than in modules/ (perhaps a drupal misconfiguration?). When I symlink the simple_karma/, there is no 'handle' file or whatever. Should this be a socket or something?

Logs:

[Wed Jul 18 19:14:26 2007] [error] [client 127.0.0.1] File does not exist: /var/www/localhost/htdocs/mentalcases/secure/boards/simple_karma, referer: https://boards.mentalcases.net/
[Wed Jul 18 19:14:50 2007] [error] [client 127.0.0.1] File does not exist: /var/www/localhost/htdocs/mentalcases/secure/boards/simple_karma/handle, referer: https://boards.mentalcases.net/

I'm using apache2 with vhosts... the jquery-update module is installed as well, and i've run update.php which said there were no updates available for any of the modules. I'm not running "universal server" or whatever. I would appreciate any help

sinthetek’s picture

DB:

mysql> select * from mc_system where filename like '%karma%';
+------------------------------------------+--------------+--------+---------------------+--------+----------+-----------+----------------+--------+
| filename | name | type | description | status | throttle | bootstrap | schema_version | weight |
+------------------------------------------+--------------+--------+---------------------+--------+----------+-----------+----------------+--------+
| modules/simple_karma/simple_karma.module | simple_karma | module | Simple Karma Module | 1 | 0 | 0 | 1 | 0 |
+------------------------------------------+--------------+--------+---------------------+--------+----------+-----------+----------------+--------+
1 row in set (0.01 sec)