• After last update (1.01) i can see error:

    Parse error: syntax error, unexpected ‘[‘ in /home/…/wp-content/plugins/srs-simple-hits-counter/SRS_Simple_Hits_Counter.php on line 135

    And i can’t turn on plugin. Isn’t a multisite. What to do?

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author SandyRig

    (@sandyrig)

    What is your PHP and WordPress version

    Plugin Author SandyRig

    (@sandyrig)

    Please replace the function on line 131 with this and let me know if it solves the issue for you.

    function count_total_visitors_views($return){
      	    global $wpdb;
    	    $table_name = $wpdb->prefix . 'srs_simple_hits_counter';
    	    if ($return == 'views') {
    	        $srs_views = $wpdb->get_results("SELECT SUM(srs_views_count) as total FROM $table_name "); 
     	        return $srs_views[0];
            } else {
    	        $srs_visitors = $wpdb->get_results("SELECT SUM(srs_visitors_count) as total FROM $table_name ");
                return $srs_visitors[0];
            }
    	}
    Thread Starter poch78

    (@poch78)

    PHP 5.2.17 and WP 4.8.1

    After replacing i can see:

    Parse error: syntax error, unexpected ‘&’ in /home/…/wp-content/plugins/srs-simple-hits-counter/SRS_Simple_Hits_Counter.php on line 134

    Thread Starter poch78

    (@poch78)

    And there is not table “wp_srs_simple_hits_counter” in my wpdb.

    Plugin Author SandyRig

    (@sandyrig)

    That’s the issue, please deactivate and then re activate the plugin. It’s supposed to create the table on activation.

    Thread Starter poch78

    (@poch78)

    Somenthing is wrong with instalation. I downloaded plugin again, there is error in line 135 (when im trying to turn it on) and i cant find table in db.

    • This reply was modified 7 years, 3 months ago by poch78.
    Plugin Author SandyRig

    (@sandyrig)

    Please run this in your database and let me know the result.

    SELECT * FROM wp_options WHERE option_name LIKE 'migrated_to_version'

    • This reply was modified 7 years, 3 months ago by SandyRig.
    Thread Starter poch78

    (@poch78)

    Empty result:)

    Plugin Author SandyRig

    (@sandyrig)

    Just want to confirm that manually reactivating the plugin is not helping.

    • This reply was modified 7 years, 3 months ago by SandyRig.
    Thread Starter poch78

    (@poch78)

    Unfortunately not, i tried several times to uninstall and download it again.

    Plugin Author SandyRig

    (@sandyrig)

    We are aware of an issue with upgrades but that generally fixes it self if the plugin is reactivated because our data migration function is hooked to register activation hook that no longer works for upgrades. It doesn’t break the site, only the plugin stops counting.

    But in your case even reactivating the plugin is not working.

    I’ll investigate and update over the weekend.

    • This reply was modified 7 years, 3 months ago by SandyRig.
    Thread Starter poch78

    (@poch78)

    Ok, no problem, thank You for your attention and help. I’ll be waiting for be waiting for an update:)

    Plugin Author SandyRig

    (@sandyrig)

    I have released an update please install that and let me know how it goes.

    Thread Starter poch78

    (@poch78)

    Hello,

    Now i can see critical error in line 149

    Parse error: syntax error, unexpected ‘[‘ in /home/…/wp-content/plugins/srs-simple-hits-counter/SRS_Simple_Hits_Counter.php on line 149

    Plugin Author SandyRig

    (@sandyrig)

    Ok, try replacing this function ‘count_total_visitors_views’ near that line with the below code.

    function count_total_visitors_views($return){
      	    global $wpdb;
    	    $table_name = $wpdb->prefix . 'srs_simple_hits_counter';
    	    if ($return == 'views') {
    	        $srs_views = $wpdb->get_results("SELECT SUM(srs_views_count) as total FROM $table_name "); 
     	        return $srs_views[0];
            } else {
    	        $srs_visitors = $wpdb->get_results("SELECT SUM(srs_visitors_count) as total FROM $table_name ");
                return $srs_visitors[0];
            }
    	}
    • This reply was modified 7 years, 3 months ago by SandyRig.
Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘1.01 Update’ is closed to new replies.