Voting arrows don't appear

mercmobily - November 22, 2007 - 04:40
Project:Simple Karma
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This is an aggregate bug for:

http://drupal.org/node/193758
http://drupal.org/node/193769

[guppydrupal]
I'm having trouble setting it up in the zen theme. I put it exactly where the new readme document says in the page.tpl.php but all I see is the "0" and no up or down arrows.

[VladSavitsky]
Hi, I have installed a CVS-version of SK and:
1) when JS is anabled I don't see an arrows for UP/DOWN voting
2) without JS I see a radio buttons UP and DOWN.
See a screenshots.

I have made a new release of the module. It should be pretty much "it".
Please follow the INSTALL instructions, making absolute sure the right things are about < head> and that your caches are free, and please report back here.
Original bugs closed.

Bye!

Merc.

#1

mercmobily - November 22, 2007 - 04:52
Title:Voting arrows don't appear» UI: Voting arrows don't appear

#2

mercmobily - November 22, 2007 - 05:05

Hi,

Guys, please make sure you have this just after opening < body > :

<?php
if(module_exists('simple_karma')){ print simple_karma_template_forms();}
?>

And this just before clising < head >:

<?php
if(module_exists('simple_karma')){  <?print simple_karma_insert_js_css(); }
?>

Bye...!

Merc.

#3

mercmobily - November 22, 2007 - 06:20

Hi,

If you still have problems, please paste here your page source till "".
Also, did you change the setting:

CSS files directory:

in Simple Karma?
(unless you know what you're doing, it's best to leave that as it is...)

Merc.

#4

VladSavitsky - November 22, 2007 - 08:56

I have installed clean Dd5.3, fresh CVS-version of Simple Karma and did all written in Install.txt.
When JS is installed I see a radio-buttons and they work as well as a drop-down menu for voting.

In HTML I have this:

<li class="last simple_karma"><span class="simple_karma">
        <div class="simple_karma karma_3 karma_promoted">
        <form action="/ekklesia/simple_karma/handle" method="get" class="karma_form" id="x93">
         
          <span class="karma_score">0</span>
          <span class="karma_buttons">
            <label class="karma_up" for="u93">
              <input id="u93" type="radio" name="karma_vote" value="1"/>
              <span>Up</span>
            </label>
            <label class="karma_down" for="d93">
              <input id="d93" type="radio" name="karma_vote" value="-1"/>
              <span>Down</span>
            </label>
            <input type="hidden" name="oid" value="93"/>
            <input type="hidden" name="otype" value="n"/>
            <input type="hidden" name="form_style" value="3"/>
            <input type="hidden" name="form_type" value="form"/>
            <input type="submit" name="submit" value="Vote" />
           
          </span>
        </form></div></span></li>

And when page is loading I can see than appears a form for non-JS version and than this form disapears.
So this should be a JS problem.

With clean zen theme all the same...

AttachmentSize
page.tpl_.php_.txt 3.61 KB

#5

mercmobily - November 22, 2007 - 14:12

Hi,

I THINK I FIXED THIS BUGGER!!!
Please test SImple Karma CVS.

You can "extract" it from drigg_distr as well, here, if you don't like CVS:

http://www.drigg-code.org/files/www.drigg-code.org/drigg_distr.tgz

Please let me know if it worked!

If it didn't, please tell me what you see here in your PAGE source:

[...]
<script type="text/javascript">
document.write('<style type="text/css" media="all">@import "/sites/www.drigg.org/modules/simple_karma/simple_karma_js.css";</style>');
</script>
</head>
<body class="front logged-in both-sidebars">
[...]

AND also tell me which folder your Drupal runs under.

Thank you!

Merc.

#6

mercmobily - November 23, 2007 - 14:25
Title:UI: Voting arrows don't appear» Voting arrows don't appear

Hi,

Changed the title - this wasn't an UI problem after all but a classic code problem...

Merc.

#7

VladSavitsky - November 23, 2007 - 20:00

Here is my head-code:

<head>
  <title>Drupal</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="alternate" type="application/rss+xml" title="Drupal RSS" href="http://localhost/ekklesia/rss.xml" />

<link rel="shortcut icon" href="/ekklesia/sites/all/themes/zen.abac/favicon.ico" type="image/x-icon" />
<!--[if lt IE 7]><script type="text/javascript" src="/ekklesia/sites/all/modules/admin_menu/admin_menu.js"></script><![endif]-->
  <style type="text/css" media="all">@import "/ekklesia/sites/all/modules/admin_menu/admin_menu.css";</style>
<style type="text/css" media="all">@import "/ekklesia/modules/book/book.css";</style>
<style type="text/css" media="all">@import "/ekklesia/modules/node/node.css";</style>
<style type="text/css" media="all">@import "/ekklesia/modules/system/defaults.css";</style>
<style type="text/css" media="all">@import "/ekklesia/modules/system/system.css";</style>
<style type="text/css" media="all">@import "/ekklesia/modules/user/user.css";</style>
<style type="text/css" media="all">@import "/ekklesia/sites/all/modules/simple_karma/simple_karma_all.css";</style>
<style type="text/css" media="all">@import "/ekklesia/sites/all/themes/zen.abac/style.css";</style>
  <script type="text/javascript" src="/ekklesia/misc/jquery.js"></script>
<script type="text/javascript" src="/ekklesia/misc/drupal.js"></script>
<script type="text/javascript" src="/ekklesia/sites/all/modules/jquery_update/compat-1.0.js"></script>
<script type="text/javascript" src="/ekklesia/sites/all/modules/simple_karma/simple_karma.js"></script>
<script type="text/javascript" src="/ekklesia/sites/all/modules/dhtml_menu/dhtml_menu.js"></script>
<script type="text/javascript" src="/ekklesia/sites/all/modules/jquery_update/collapse-fix.js"></script>
<script type="text/javascript">Drupal.extend({ settings: { "dhtmlMenu": { "useEffects": 0 } } });</script>

<script type="text/javascript">
document.write('<style type="text/css" media="all">@import "/sites/all/modules/simple_karma/simple_karma_js.css";</style>');
</script>
</head>

#8

VladSavitsky - November 23, 2007 - 20:01
Assigned to:mercmobily» VladSavitsky

#9

VladSavitsky - November 23, 2007 - 20:01

#10

mercmobily - November 24, 2007 - 00:11

Hi,

It was a human error...
The human being me!!!
The bug is resolved. VladSavitsky, please test it and close it if it works for you.

Thank you for your patience, and for posting the faulty code here... it took me 2 seconds to work out where the (hideous) problem was once I saw your pace source!

Merc.

#11

VladSavitsky - November 24, 2007 - 09:42

Thanks.
I have used a new CVS-version:
In opera 9.02 al works fine.
In Firefox I can't see an arrown when JS is anabled - just a karma amount.

In Konqueror 3.5 I see a buttons but I can't click them - foreground text is "Up Down". See an attachment.

AttachmentSize
karma9.png 17.13 KB

#12

mercmobily - November 24, 2007 - 10:04

Hi,

It now looks like your firefox is using the old Javascript (!).
Please make absolute sure you empty your cache in firefox, and try again with Firefox.
(Sorry, Konqueror was never tested...)

IF you still have problems, please post:

Please post:

* The page source for the home page, complete, as it comes when you do "Page Source" from your browser
* The complete URL you viewed (complete with subfolder)
* The exact length of simple_karma.module - the "right" one for the latest one should be 102568 bytes
* The exact length of simple_karma.js - the "right" one for the latest one should be 5431 bytes
* The exact length of simple_karma_all.css is 4529 bytes, and that simple_karma_js.css is 2628 bytes
* What you can see as "CSS files directory:" in Admin -> Settings

* IF YOU CAN, an URL where I can actually reach this site...

Bye,

Merc.

#13

mercmobily - November 24, 2007 - 10:10

Hi,

VladSavitsky, I am happy to get this solved in a Instant Messenger session...
Please let me know if you have an AIM/GTALK/MSN/etc. so that we can get together as squash this once for all...

Merc.

#14

VladSavitsky - November 24, 2007 - 19:44

I have cleared a cache. But nothing is changed.
I'm using a FF 1.5.0.7

In JS console I see (I translated):

Error: Error while parse a value of parameter 'display'. Lost rule.
Source: http://localhost/ekklesia/sites/all/modules/simple_karma/simple_karma_js...
Line: 30

The same about line 60.

This lines about:
display: inline-block;

But only FF (1 and 2) does not suport this!...
FF supports "block" and "inline"
I have tryed both but it did not help.

* The page source for the home page, complete, as it comes when you do "Page Source" from your browser
see an attach.

* The complete URL you viewed (complete with subfolder)
http://localhost/ekklesia/ - Home page.

* The exact length of simple_karma.module - the "right" one for the latest one should be 102568 bytes
yes.

* The exact length of simple_karma.js - the "right" one for the latest one should be 5431 bytes
yes.

* The exact length of simple_karma_all.css is 4529 bytes, and that simple_karma_js.css is 2628 bytes
yes.

* What you can see as "CSS files directory:" in Admin -> Settings
Nothing - empty field.

* IF YOU CAN, an URL where I can actually reach this site...
It's a localhost...

ICQ:205535814
Jabber:vlad_savitsky@jabber.org

AttachmentSize
ekklesia.htm 46.38 KB

#15

mercmobily - November 25, 2007 - 02:29

Hi,

Vlad, I don't know, and I can't reproduce this bug :-(
I even installed Firefox 1.5.0.7 on my system (and nearly lost all of my bookmarks!) to see if it was a problem with your version of firefox, but no...
Also, your page.tpl.php looks totally fine.

Can you please:

* See if you can put the site online somewhere, so that I can have a look. This would be the BEST thing to do...
* Try and put the site as / rather that ekklesia/ and report back
* Let me know if you get ANY Javascript errors (not CSS errors!) when you load the page

Does anybody else have the same problems?

Please let me know...

Bye,

Merc.

#16

mercmobily - November 25, 2007 - 05:24

Hi,

I have more questions after a lot of onvestigation:

1) Does the problem happen only with comments, or with comments and nodes? Does it happen when the voting form is in the "link" section or in the "stand alone" one as well?

2) If you untick "Only allow one vote", does the problem persist?

3) If you put "0" in the "time limit" for which a vote can be cast (settings in simple_karma), does the problem persist?

Bye!

Merc.

#17

eiox - November 25, 2007 - 06:53

I get this problem before.

The lastest drigg_distr.tgz working fine now !! ^.^

I test on:
Firefox 2.0.0.9
IE 7
Opera 9.50 beta (build 9613)

#18

spython - November 25, 2007 - 17:01

Had the same problem, it didnt work until I replaced

<?print simple_karma_insert_js_css(); ?> in the head of page.tpl.php with this:

<?php if(module_exists('simple_karma')){ print simple_karma_insert_js_css(); } ?>

Big thanks for the great module by the way!

#19

mercmobily - November 26, 2007 - 08:06

Hi everybody,

Anthony Taylor rewrote the whole simple karma subsystem.
This means that we do NOT need those templates in each page anymore (and therefore, we don't need simple_karma_show_templates() anymore!), and voting should be a hell of a lot more robust.

Please have a look and let me know...

I updated the INSTALL.txt file as well.

Bye!

Merc.

#20

mercmobily - November 27, 2007 - 01:57

Hi,

Vlad, are you still here?
If I don't hear from anybody about this within 24 hours, I will consider it closed.

Merc.

#21

Snowflake1 - November 27, 2007 - 07:55

Some of my users are reporting the same bug for firefox but not safari.

#22

VladSavitsky - November 27, 2007 - 11:36

I have reinstalled D5.3 and updated Simple Karma from CVS today. Theme is "garland".
1.Nothing Changed in Drupal. Just install Simple Karma and apply changes described in Install.txt
2. Set (at modules config page) "Node types that will accept karma" - for Page and Story.
3.Set ranges for roles karma_1 and karma_2. [1-111], [111-1111]
4.Set a voting style for nodes to: Up, Down

This is all changes. Than I have created a page....
In FF I see a radio-buttons with button for node. JS is enabled. So it looks like no JS found for this browser.
When I check any of radio-buttons total amount is changed and saved correctly without clicking a button "Vote".
Very Good!!!
Button "Vote" can be hidden.
In Opera 9.02 all works the same way (js is enabled).

If JS is disabled all works fine. Voting saved by a pressing a button "Vote" in Opera and FF.

* See if you can put the site online somewhere, so that I can have a look. This would be the BEST thing to do...
Sorry, I can't.

* Try and put the site as / rather that ekklesia/ and report back
I don't place a Drupal in web-server's root but created a symbolic links (Unix) in root for all folders and files from ekklesia/*
In Opera all works fine. Without JS as described above. If JS is enabled - I even see a arrows for voting!!!!! All works!
In FF when JS is ON - I can't see a form at all.
If JS is disabled - I see a radio-buttons an "Vote"-button. They work correctly.

When I choose a UP (total=1) - form is placed inline with link section.
When "Down" was choosed (total=0) - karma-form starts from a new line.

I think problem the same as described here: http://drupal.org/node/195685

* Let me know if you get ANY Javascript errors (not CSS errors!) when you load the page
No errors.

#23

VladSavitsky - November 27, 2007 - 11:46
Version:5.x-1.10» 5.x-1.x-dev
Assigned to:VladSavitsky» Anonymous

1) Does the problem happen only with comments, or with comments and nodes? Does it happen when the voting form is in the "link" section or in the "stand alone" one as well?
Problem is with nodes and comments.
I have tested only when in link section.

2) If you untick "Only allow one vote", does the problem persist?
Yes. Nothing changed.

3) If you put "0" in the "time limit" for which a vote can be cast (settings in simple_karma), does the problem persist?
I didn't found this parameter. I really don't think this can be a problem's root because in one browser all works at the same time.

#24

VladSavitsky - November 30, 2007 - 21:41

Have updated from CVS (30.11.2007)

Fixed.
In FF I see a radio-buttons (with or without JS).
In Opera I see a radio-buttons but with JS it's not nessesary to push "Vote" button.

Thanks.

#25

mercmobily - December 1, 2007 - 13:55

Hi,

As you probably saw, there was a *lot* of activity as far as the module.
The CSS is now stable. We had to battle a nasty IE bug...

I don't get it though. Considering that for now I am not testing Opera... I am mostly concerned with FF and IE at the moment (I WILL work on Opera as well, but not just yet).

Now... you wrote:

* In FF I see a radio-buttons (with or without JS).

You shouldn't see a radio button - you should see arrows instead!

Does it have the same problem if Drupal is installed in the server's document root?
Can you send an update screenshot of the problem, in IE and FIrefox?

Bye,

Merc.

#26

mercmobily - December 5, 2007 - 11:48

Hi,

It is with extreme pleasure that I close this bug.
Fixed in 1.13 - thank you VladSavitsky!

Bye :-D

Merc.

#27

mercmobily - December 5, 2007 - 11:51
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.