• Resolved gntvls

    (@gntvls)


    Hello,
    when reviewing subscriptions, there is an error =>

    'mydbname.wp_wc_comments_subscription' doesn't exist]
    SELECT COUNT(*) FROM wp_wc_comments_subscription WHERE email = '[email protected]';

    It does not have an DB prefix included, it includes its own prefix wp_

    It is :

    public function getSubscriptionsCount($userEmail) {
    
            $sql = $this->db->prepare("SELECT COUNT(*) FROM wp_wc_comments_subscription WHERE email = %s;", trim($userEmail));
    
            $result = $this->db->get_var($sql);
    
            return $result;
    
        }

    It should be something like this =>

    public function getSubscriptionsCount($userEmail) {
    
            $sql = $this->db->prepare("SELECT COUNT(*) FROM ".$this->dbprefix."wc_comments_subscription WHERE email = %s;", trim($userEmail));
    
            $result = $this->db->get_var($sql);
    
            return $result;
    
        }
    • This topic was modified 7 years, 11 months ago by gntvls.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support gVectors Support

    (@gvectorssupport)

    Hi gntvls,

    Thank you for letting us know.

    We’ve already fixed this issue and are preparing new wpDiscuz version. Please wait for the next update it’ll come soon.

    Thread Starter gntvls

    (@gntvls)

    Good and thanks, also i noticed, that users cannot edit their comments. I set settings for 15, 30, 60 min. Button appears only when i set Unlimited time to edit comment.

    Hope this is also known issue for you. Thanks for plugin, and good luck

    Plugin Support gVectors Support

    (@gvectorssupport)

    Hi gntvls,

    We couldn’t find such an issue on our test websites. Please leave some example URL to allow us to check it.

    Thread Starter gntvls

    (@gntvls)

    You can check it here: https://www.f1news.lt/mercedes-bolidu-gedimai-austrijoje-nesusije/

    Now i set setting to allow edit comments to 15 minutes. When comment is written, no edit button appears.

    It is in Lithuanian language, so Edit => Redaguoti and Reply => Atsakyti

    • This reply was modified 7 years, 11 months ago by gntvls.
    • This reply was modified 7 years, 11 months ago by gntvls.
    Plugin Support gVectors Support

    (@gvectorssupport)

    Hi @gntvls,

    Could you please make some changes in the file class.WpdiscuzHelper.php file in wpDiscuz/utils folder.

    Change the code in line 128:

    $timeDiff = (time() - strtotime($comment->comment_date_gmt));

    to the following one

    $timeDiff = (current_time('timestamp') - strtotime($comment->comment_date_gmt));

    Check again and let us know how it works.

    Thread Starter gntvls

    (@gntvls)

    Works, but this is in method isCommentEditable on line 245 for me.

    Plugin Support gVectors Support

    (@gvectorssupport)

    Thank you gntvls,

    This will be fixed in next version release.

    Thread Starter gntvls

    (@gntvls)

    Thanks! Have a good day!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error, because no prefix in SQL query’ is closed to new replies.