Firstly, fantastic module - thanks!

I'm using the latest version of the module (as of today) along with the latest CVS version of drupal 4.7.

The browsers I'm using is CSS-capable (for example, FF 1.5.0.1) but the widget appears on some nodes but not on others (see attached screenshot).

I have no idea why. Anyone else?

Comments

jl79’s picture

Hi Patrick,

Sorry for taking so long to get back to you, but for some stupid reason, I had notification of bug reporting turned off.

I think a new version of the module that I'm about ready to push to CVS should fix the problem. I will hopefully have that all wrapped up and committed in a few days.

One thing to note - If a vote is cast on a node, the widget will not show up - are you sure there is not a votingapi_vote cast for that node? As it's showing 0 for a score, my guess is this is not the issue, but it's worth noting.

I will let you know when the new version is available.

Jim

Patrick Nelson’s picture

Thanks Jim,

Looking forward to it - this is a superb module!

jl79’s picture

Assigned: Unassigned » jl79
Status: Active » Needs review

I have made some changes in the newest version (1.2) available in CVS that will hopefully fix this problem. Please take a look and let me know if you continue to have this problem.

Thank you.

naudefj’s picture

I've just installed the latest CVS version (v1.2 dated 2006/04/15 18:10:21) and get the same problem. I'm using FireFox 1.0.6.

jl79’s picture

Are the nodes that are not displaying correctly custom ones? Do you have custom templates/themes for those nodes?

It appears that the css file is not being included for the bad node in your image - can you check the source of the page to make sure the path to mediumvote.css looks right (compare the path to mediumvote.css to other css files)? You may need to adjust the css path function to work with your customization.

naudefj’s picture

I can simulate the problem by simply clicking through normal "page" nodes. These pages are rendered with the default pushbutton PHP template theme.

The correct CSS and JS are always included:

<script type="text/javascript" src="/admin/drupal/modules/mediumvote/theme/ajax_mediumvote.js"></script>
<style type="text/css" media="all">@import "modules/mediumvote/theme/mediumvote.css";</style>
jl79’s picture

Hmmm, interesting.

Try commenting out the

if ($user->uid == 0 OR $user_vote) {

check on line 17 of the theme_mediumvote_icon function and make sure this

      $attributes = array(
        'class' => $class,
        'title' => 'Rate' 
      );
      $link = '';

just is always executed.

It checks to make sure the user is logged in or if a vote has already been cast by the user for the given node - so essentially, we're checking if this is where the widget is being excluded.

Also, could you provide the html source that appears for a good widget and the source for a bad widget? Might also help narrow down what the problem is.

Thanks for your help.

naudefj’s picture

StatusFileSize
new871 bytes

I've fixed the display problem with the attached patch. However, I now get an error when casting a vote:

"An HTTP error 404 occured
ajax_mediumvote/node/Rating:/566/40"

Ignas’s picture

Title: Voting widget doesn't always appear » The same and similar problems
StatusFileSize
new34.01 KB

On some specific nodes I have only text result displayed as in example. HTML code is OK, Ajax is included, but no functionality. Patch sumbited solved some problems - initial display is OK, but after voting, Ajax(?) ruins design - mediumvote_widget div loads web page copy. This could be my template problem. Trying to find out.

Another problem: all comments in post have the same page ID's. Therefore all comment votes in one page function as one. This must be a bug.

Another strange behavior is explaned in picture attached: page and first comment votes shown in AJAX mode the rests votes in HTML. Browser: Forefox. No javascript errors. In IE votes displayed in HTML mode, Javascript errors.

Small request: voting on users (/user/). O any ideas how to do that?
The same compliment - nice module :) but with problems.
I use 4.7 final and 1.2 module version.

Ignas’s picture

Title: The same and similar problems » Voting view problems

Sorry for the language and the mess.

Ignas’s picture

Title: Voting view problems » Voting widget doesn't always appear
Vladekk’s picture

All who has problems with IE and AJAX please look also at the bug
http://drupal.org/node/64791

Christoph C. Cemper’s picture

I encounter similar problems... I applied the Ajax / JS bugfix, but the real problem is that mediumvote won't display correct with clean urls enabled

ie

http://www.dp472-cvsonly.com/?q=node/1 work

and

http://www.dp472-cvsonly.com/node/1

doesn not!

Christoph C. Cemper’s picture

StatusFileSize
new10.38 KB

ok - well - I took the latest version from head and patched this module patch...

now it's displayed with clean urls as well

but the comments all have the same rating...every new comment get#s the same rating!

for those that want a working package, I attach a zip file here with a mediumvote that works here...

Christoph C. Cemper’s picture

I noticed this version doesn't work always in IE, while it does if FF and Opera... damn Javascript

any test feedback appreciated!