jDownloadsownloads.com


Author Topic: Ratings problem : "You have already voted for this item"  (Read 4237 times)

0 Members and 1 Guest are viewing this topic.

Offline romagromov

  • Sr. Member
  • ****
  • Posts: 317
I have readed other topics, but can't find solution.
Even item don't have any votes, after I press on vote star I get message "You have already voted for this item"
But, after reload page my vote displays, and in database it displays too.

After that, I change ip in database, and vote again, and get message "You have already voted for this item".
But now this item have 2 votes.
So, no matter what is your IP - you will always get message "You have already voted for this item" and your voice will be recorded in the database.
Best free windows software for your PC at bestwinsoft.com

Offline romagromov

  • Sr. Member
  • ****
  • Posts: 317
Re: Ratings problem : "You have already voted for this item"
« Reply #1 on: 11.07.2014 18:37:31 »
I found solution.
It because your code is too old.

As of PHP 5, the new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions.
Best free windows software for your PC at bestwinsoft.com

Offline Arno

  • Administrator
  • ***
  • Posts: 12.271
    • jDownloads.com
Re: Ratings problem : "You have already voted for this item"
« Reply #2 on: 09.08.2014 12:23:02 »
Hi,
many thanks for this hint. We will fix this for the jD versions 2.5/3.2 (when required).
For the older releases are not more updates planed.

Edit:
I can not reproduce your problem here with PHP 5.4.0.
Can you say what exactly you have changed to fix it in your environment?
« Last Edit: 09.08.2014 12:40:07 by Arno »
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline romagromov

  • Sr. Member
  • ****
  • Posts: 317
Re: Ratings problem : "You have already voted for this item"
« Reply #3 on: 09.08.2014 17:04:37 »
in file /components/com_jdownloads/assets/rating/ajax.php

find

$mainframe = JFactory::getApplication('site');
$database = JFactory::getDBO();

replace with

$mainframe = &JFactory::getApplication('site');
$database = &JFactory::getDBO();
Best free windows software for your PC at bestwinsoft.com