gunn4r
Veteran
Just Getting Started
Member Likes (0)
I've been using the plugin for awhile now and have been getting reports from using that the question voting (up/down) system isn't functioning properly. When users vote on a question or response instead of registering the vote and continuing to display the question/response, it loads the content from the home page.
This seems to not be a problem for Administrators. I've confirmed the prob occurring on a subscriber account. This happens to me in Firefox and Chrome. In IE when I vote it just loads a blank white page. (though another user is getting the same loading of the homepage in the div where the question/response should be in IE.)
Screenshots:
Before: http://www.becomemagi.com/img/problem/before.jpg
After: http://www.becomemagi.com/img/problem/after.jpg
Thanks in advance for any help resolving this issue.

Responses (14)
Inactive (joined February 2012) Likes (0)
Hello gunn4r,
I tried to replicate this, but no luck. Can you give me a link to your site so that we can see for ourselves?
Member (joined April 2012) Likes (0)
The link is http://www.becomemagi.com
Member (joined April 2012) Likes (0)
Also keep in mind this problem only seems to occur on non-admin user accounts.
Developer (joined February 2012) Likes (0)
Hi gunn4r,
We didn't forget your problem :)
We are now reworking on q&a and I am trying to distinguish real q&a issues with those related to the themes themselves.
When I look in your theme I see an issue in this line:
ajaxurl cannot be wp-load.php as it simply reloads Wordpress. So I believe this is a problem in your theme.
This wrong setting has different behaviour in IE and Chrome and FF, thus explaining your observations.
To confirm it, can you please switch to the default Wordpress theme and see if you are having the same issue with the default theme.
Cheers,
Hakan
Member (joined April 2012) Likes (0)
Thanks for your attention on this Hakan! Been loving the functionality of the plugin.
I enabled Twenty Eleven on a development install (http://gunn4r.com/questions/test-question/) and the upvoting/downvoting seems to work just fine so your analysis is most likely spot on.
Is there an easy way to fix this on my theme?
Developer (joined February 2012) Likes (0)
Hi gunn4r,
Try this:
1. Search and find this in your theme files: wp-load.php
2. Replace it with: wp-admin/admin-ajax.php
So now ajaxurl will be shown like this:
http://www.becomemagi.com/wp-admin/admin-ajax.php
This should do the trick. It will also help solving potential issues for other plugins using ajax.
I am seeing this problem for the second time. Maybe the theme developer is the same. Is this a purely custom theme or adapted from an already existing one?
Cheers,
Hakan
Member (joined April 2012) Likes (0)
Thanks Hakan, I'll give this a shot and let you know.
The theme is called Salutation by Parallelus here: http://para.llel.us/themes/salutation-wp/
With almost 3k sales on Theme Forest, it's a pretty popular buddypress compatible theme.
Developer (joined February 2012) Likes (0)
Hi gunn4r,
After some digging of the codes I noticed that this is happening because of a weird and unfortunate choice of ajaxurl javascript variable by Buddypress guys.
So this is not caused by voting button itself, but the ajax action happening when you click a voting button.
You see, Wordpress sets ajaxurl to locate admin-ajax.php on the admin side, but Buddypress uses wp-load.php on the front end. If you are using tinyMCE on the front end it automatically sets ajaxurl as admin-ajax.php and creates a conflict with Buddypress.
Usage of ajax is different for admins and other users and this explains why you see different results depending on user levels. wp-load.php simply reloads Wordpress and this explains why you see reloading of the website.
According to me this setting is a stupid choice and concerns about it are also mentioned here:
http://buddypress.trac.wordpress.org/ticket/2599
They say this this will be fixed in Buddypress V1.6, but I cannot be sure about it.
Although it is not caused by the plugin itself, what can we do to solve it?
I will add an option "disable wp-editor" in the next version. So the question and answer forms will be simple text areas. This will permanently solve the issue until that idiotic Buddypress conflicting line is completely removed from the universe.
Cheers,
Hakan
Member (joined April 2012) Likes (0)
Would removing tinyMCE remove the conflict then?
Developer (joined February 2012) Likes (0)
Hi gunn4r,
V1.2 is available for download now. There is a setting "Disable WP Editor" which removes tinyMCE from the forms.
I think this will solve the problem, because adding wp editor is also adding the default ajaxurl (which is conflicting with ajaxurl of Buddypress) out of control of the plugin.
Please inform us about the result as I couldn't replicate your issues even I used Salutation, IE and several different user roles.
Cheers,
Hakan
Developer (joined February 2012) Likes (0)
Hi gunn4r,
Did you have the opportunity to upgrade to the latest version and try disabling wp_editor if it fixes the issue?
Cheers,
Hakan
Member (joined April 2012) Likes (0)
Sorry not yet, been very busy with a couple of other projects. I will let you know asap.
WPMUDEV-ian (joined November 2011) Likes (0)
Hello gunn4r,
Digging into the old threads made me come across this one and I saw that we are still waiting for your response on this one.
Just to check whether everything is in place, could you please advise where we are on this one ?
Cheers
PC
DEV Diva (joined February 2012) Likes (0)
Hello @gunn4r
I will go ahead and resolve this topic, but please don't hesitate to reopen it once you have further feedback for us.
Just select the 'Mark as Not Resolved (re-open)' box below the post area (otherwise we might miss your new post).
Have a great day ahead!
Gina
Become a member