WordPress.org

Ready to get started?Download WordPress

Forums

GD Star Rating
Rating stars/thumbs showing on posts but setting a rating does not register (3 posts)

  1. pilot911
    Member
    Posted 1 year ago #

    Hi,

    GD Star Rating Version 1.9.22

    A change I made to my site since 6th Feb has stopped GD Star Rating registering votes.

    On a post, if i select a rating, the stars light up but then they are not saved.

    Could this be a file/folder permission problem.

    I tried de-activating and re-activating but to no avail.

    Under Settings/Advanced/Log Into File is set this to

    Log into file various debug information. (yes)
    Save into debug file each WP Query executed. (yes)

    But I am having trouble setting up the logging:

    There is a note: Important: Plugin must have write access to a text file. Path to this file needs to be set in config.php file.

    In wp-content/plugins/gd-star-rating/config.php i see the following lines:

    /**
    * Full path to a text file used to save debug info. File must be writeable.
    */
    if (!defined('STARRATING_LOG_PATH')) define('STARRATING_LOG_PATH', dirname(__FILE__).'/debug.txt');

    Do I need to change this and if so how do I do that?

    It is strange as the plugin was working fine up until 6th Feb, then some change (not to the plugin itself) may have knocked it out.

    If anyone can help me with this then I am most grateful. Surfers do seem to like adding their ratings to posts.

    Regards and thanks once again.

    http://wordpress.org/extend/plugins/gd-star-rating/

  2. pilot911
    Member
    Posted 1 year ago #

    OK I have the logging sorted, there was no need to change anything in the config.php file regarding the path.

    Although the output only shows the queries there does not appear to be any errors.

  3. pilot911
    Member
    Posted 1 year ago #

    Ok I managed to find an error in the apache log files, nothing (except query information) was mentioned in the GD Star Rating debug.txt

    PHP Warning: Invalid argument supplied for foreach() in /usr/home/mysite/domains/mysite.com/public_html/wp-content/plugins/gd-star-rating/gdragon/gd_functions.php on line 146, referer: http://mysite.com/wp-admin/admin.php?page=gd-star-rating-my

    It appears that this is the offending piece of code: line 146 (bold)

    /**
    * Counts files in a folder.
    *
    * @param string $path folder path
    * @return int number of files in the folder
    */
    static function get_folder_files_count($path) {
    if (!file_exists($path))
    return 0;
    if (is_file($path))
    return filesize($path);
    $ret = 0;
    foreach(glob($path."/*") as $fn)
    $ret++;

    return $ret;
    }

    Does this give anyone a clue as to what is happening here? I have several WP blogs on the same host, two of which have GD Star Rating working fine. (I checked the settings and they are all similiar)

    Thanks for your time once again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic