Darek L
Forum Replies Created
-
I had problem with reproducing this problem Today on my development platform for a long time. The “unique votings based on IP” feature works fine for a long time, even there was the JavaScript type conversion problem in the code and I didn’t change anything from last time. Moreover I noticed there is always disable set to false for all IDs in the admin-ajax.php response array, means:
"disable":"false"
Looks like it was ignored if I wasn’t able to vote many times.
However, on the official website the problem still exists (I can vote multiple times there).
Really strange bug…
tniessen,
Yes, You are 100% right the eval is not a good coding style. Better use string creation like You mentioned: if(String(disable) == ‘true’).
It is true that kksr_ajax (index.php) always sends strings, not booleans and the line looks like this:
$Response['disable'] = parent::get_options('kksr_unique') ? 'true' : 'false';
However in the markup function there is something like that:
if(in_array($ip, $Ips)) { $disabled = parent::get_options('kksr_unique') ? true : false; }
Seems it may cause a JavaScript type conversion problem.
I noticed something more strange Today. I wasn’t able to reproduce the problem too! First it worked fine (i wasn’t able to vote many times) even if I was logged in as admin. But when I cleared database (postmeta table, ratings only via phpMyAdmin) I was able vote many times again. Really really strange bug… I will try to find little time Today so maybe I will fix it and will try to find out what is going on.
Thanks,
DarekLooks like this:
if(disable=='true')
changed to this:
if(eval(disable))
solved the problem and the fix works like it should. Holy… ??
I will test it more carefully later…Any comments welcome…
Looks there is problem with “kksr_update” function in js.js file. It not goes into case if(disable==’true’) but the js.js file print correct value of disable in “kksr_update” body function just little above the “if” statement.
I have no more time to spend on it Today. Maybe I will check what is going on there Tomorrow or during this weekend.
Regards,
DarekMoreover, the “response disable” value was still “false”. I fixed the index.php file to get “response disable” value “true” in case I have the same IP and “false” if there is no IP in the database.
But… this not help! Looks like the js.js file do not care about the “response disable” value. Do not know why yet. There is still the same problem. If I am logged in as admin, everything is fine but if I am logged out I can vote many times from the same IP.
Regards,
Darektniessen,
I am not sure if I understood. I noticed the relation with login as admin and multiple votings but it looks more like “unique votings based on IP” bug not a feature. If I am logged as admin into wordpress panel I can not vote multiple times (stars are orange, how it should be). If I am logged out I can vote as many times I want (stars are yellow, like the “unique votings based on IP” would be unchecked).
I copied the files to editor and checked the lines numbers but the 444 is the markup function header. The 72 line in js.js file shows:
$('.kksr-stars a', obj).unbind('click').click( function(){ return false; });
The markup functions really looks like it has something with IP and it set up orange and yellow tags. However if I just hardcoded “orange” tag there, its not help. I still was able to vote many times.
Regards,
DarekForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript error…but there is need little more CSS work ??
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errorHowever tremblayly can use colspan… but done by CSS trick ?? Like smart hiding some borders ?? It will not be colspan (in the code) but for end-user it will be seen as colspan ?? So there is no need to turn off DataTables features ??
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errorYes Tobias, The first one is not a big issue, the second one looks more seriously and breaks javascript.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errortremblayly,
The javascript error:
Unknown RPC service: widget-interactive-I0_
is not related to the TablePress code like WooCommerce support said. It’s google button issue.
However, I see other error:
TypeError: g[(f - d)] is undefined [Break On This Error] ....parentNode;h.appendChild(b);""!==a.oScroll.sX&&""!==a.oScroll.sXInner?b.style.w...
Regards,
DarekForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errorThe solution will be:
– Check Your network.
– Check Your PC if is not overloaded.
– Check Google button placement.Tobias, I guess You can change the status to “resolved” because it is not TablePress code issue.
Regards,
DarekForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errorProbably to reproduce this issue You need to load google button on highly overloaded PC.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errorTobias,
Correct URL, I also noticed this issue on other websites without TablePress on board but with google button… It might be also related to the highly overloaded PC (end-user issue).
The 99% it is not TablePress issue, rather google button placement + end-user.
Regards,
DarekForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errorThe 99% that this comes from google button and not impact its functionality. Call from nested frames causes the error…? Changed place of google button should help…?
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] TablePress Javascript errorOpera has it too.