Title: Cannot Delete Plugin
Last modified: September 10, 2016

---

# Cannot Delete Plugin

 *  Resolved [lnikj](https://wordpress.org/support/users/lnikj/)
 * (@lnikj)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/)
 * 4.6.1 / 1.4.02
 * Pressing delete just leads to ‘Deleting …’ showing until a page refresh and a
   banner at the top of the page:
 * Deletion failed: Are you sure you want to do this?Please try again.
 * Is it safe to just zap the directory by FTP or is there stuff in the database(
   which I have no phpmyadmin access to unfortunately).
 * Thanks.

Viewing 15 replies - 16 through 30 (of 41 total)

[←](https://wordpress.org/support/topic/cannot-delete-plugin-3/?output_format=md)
[1](https://wordpress.org/support/topic/cannot-delete-plugin-3/?output_format=md)
2 [3](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/3/?output_format=md)

 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589839)
 * **Repair Forums** doesn’t resolve it.
 *  Plugin Author [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * (@geekserve)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589844)
 * [@tronix-ex](https://wordpress.org/support/users/tronix-ex/),
 * Can you confirm `[bbp-stats]` and `[bbpas-activity]` return the same data? (They
   are shortcodes, pop them on a page somewhere)
    -  This reply was modified 9 years, 5 months ago by [Jake Hall](https://wordpress.org/support/users/geekserve/).
    -  This reply was modified 9 years, 5 months ago by [Jake Hall](https://wordpress.org/support/users/geekserve/).
 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589858)
 * `[bbpas-activity]` return nothing while `[bbp-stats]` returns the exact counts
 *  Plugin Author [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * (@geekserve)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589864)
 * Hi [@tronix-ex](https://wordpress.org/support/users/tronix-ex/),
 * Can you enable the shortcode within `Forums > bbPress Advanced Statistics > Extras
   > Enable Shortcode` and give it another shot.
 * Thanks.
 * `
 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589870)
 * Now it shows so the results are below:
 * `[bbp-stats]` counts:
    Topics 328 Replies 5,146
 * `[bbpas-activity]` counts:
    Threads: 328, Posts: 333
    -  This reply was modified 9 years, 5 months ago by [tronix-ex](https://wordpress.org/support/users/tronix-ex/).
 *  Plugin Author [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * (@geekserve)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589896)
 * So for some forums this is working.
 * Others, such as your own, it isn’t. I have actually create a test plugin for 
   this, would you mind installing it and letting me know what it returns? Simply
   add the code below to your **functions.php** file:
 *     ```
       <?php
       function bbp_get_stats_bf() {
            $stats = bbp_get_statistics();
            return "Replies: ." . $stats['reply_count'] . "<br>Topics: " . $stats['topic_count'];
       }
   
       add_shortcode( 'bbp-get-stats', 'bbp_get_stats_bf' );
       ```
   
 * All it will do is fetch the stats, and, return them in a shortcode. Once you 
   install this, can you add the shortcode ‘bbp-get-stats’ to the others you’ve 
   setup and get back to me? Can I also have a link to your forum if possible?
 * Thanks,
 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589911)
 * ok I’ve added the function and it returns exact counts.
 * here is the demo url 1st is the `bbp-stats` 2nd is the `bbpas-activity` and 3rd
   is `bbp-get-stats`.
    -  This reply was modified 9 years, 5 months ago by [tronix-ex](https://wordpress.org/support/users/tronix-ex/).
 *  Plugin Author [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * (@geekserve)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8589940)
 * hi [@tronix-ex](https://wordpress.org/support/users/tronix-ex/),
 * thanks for that. honestly not sure where this is going AWOL. I’ll take a look
   into it tomorrow a little more, however, I can’t replicate this bug so it’s essentially
   guesswork.
 * what version of PHP do you have installed?
 * also – I didn’t manage to see the link. if you’d like to keep it private, email
   it to me 🙂
 * thanks,
 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8590764)
 * Hi Jake [@geekserve](https://wordpress.org/support/users/geekserve/),
 * I’ve figured it out explained below.
 * Edited this file:
    `bbpress-improved-statistics-users-online\includes\public\
   class.online.php`
 * Changes on Line number **397**
    `$stat_replies` to `$stats['reply_count']`
 * and all done..
 * Thanks Jake for such a great plugin once again, I hope the bug will help other
   peoples also.
    -  This reply was modified 9 years, 5 months ago by [tronix-ex](https://wordpress.org/support/users/tronix-ex/).
    -  This reply was modified 9 years, 5 months ago by [tronix-ex](https://wordpress.org/support/users/tronix-ex/).
 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8590784)
 * Here is the forum URL
 * [http://danishgardi.pk/whos-online/](http://danishgardi.pk/whos-online/)
 *  Plugin Author [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * (@geekserve)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8590806)
 * Hi [@tronix-ex](https://wordpress.org/support/users/tronix-ex/),
 * Glad you managed to suss that – do note with the change you have made you will
   not be able to count the original post within each topic in the stats.
 * Could you do me a quick test? Before I push this fix out, can you update `class.
   online.php` with the following code and let me know if it works?
 * Replace:
    `$stat_replies = ( ( $this->parent->option['bbpress_statistics_merge']
   == "on" ) ? ( $stats['reply_count'] + $stats['topic_count'] ) : $stats['reply_count']);`
 * with:
 *     ```
       $stat_replies = $stats['reply_count'];
   
                       if( $this->parent->option['bbpress_statistics_merge'] == "on" ) {
                           $stat_replies = $stats['reply_count'] + $stats['topic_count'];
                       }
       ```
   
 * and change the variable you changed earlier back to `$stat_replies`? That should
   hopefully fix the issue fully!
 * – Jake
 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8590915)
 * No its now showing a wrong count.
 *  Plugin Author [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * (@geekserve)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8590933)
 * Hi [@tronix-ex](https://wordpress.org/support/users/tronix-ex/),
 * Do you have the option `bbPress Statistics Merge` enabled?
 * Really bizarre this issue, I would very much like to resolve it.
 * – jake
 *  [tronix-ex](https://wordpress.org/support/users/tronix-ex/)
 * (@tronix-ex)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8590947)
 * Yes its checked.
 *  Plugin Author [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * (@geekserve)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/2/#post-8590952)
 * [@tronix-ex](https://wordpress.org/support/users/tronix-ex/),
 * Can you uncheck it and see what happens. That will then display the replies.
 * It seems to be an issue when adding the replies and topics… could you try this
   code with the option ticked and let me know what happens?
 *     ```
       $stats = bbp_get_statistics();
   
                       $stat_replies = $stats['reply_count'];
   
                       if( $this->parent->option['bbpress_statistics_merge'] == "on" ) {
                           $stat_replies = ( intval($stats['reply_count']) + intval($stats['topic_count']) );
                       }
   
                       $HTMLOutput["forum_stats"] = $this->shortcode_tool_build_title( __('Forum Statistics', 'bbpress-improved-statistics-users-online'), false );
   
                       if( $this->parent->option['bbpress_statistics'] == "on" ) {
                           $HTMLOutput["forum_stats"] .= '<span class="bbpas-title">' . __('Threads', 'bbpress-improved-statistics-users-online') . ": </span>{$stats['topic_count']}, " 
                           . '<span class="bbpas-title">' . __('Posts', 'bbpress-improved-statistics-users-online') . ": </span>{$stat_replies}, "
                           . '<span class="bbpas-title">' . __('Members', 'bbpress-improved-statistics-users-online') . ": </span>{$stats['user_count']}<br>";
                       }
       ```
   
 * Thank you

Viewing 15 replies - 16 through 30 (of 41 total)

[←](https://wordpress.org/support/topic/cannot-delete-plugin-3/?output_format=md)
[1](https://wordpress.org/support/topic/cannot-delete-plugin-3/?output_format=md)
2 [3](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/3/?output_format=md)

The topic ‘Cannot Delete Plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bbpress-improved-statistics-users-
   online_f8f8f8.svg)
 * [bbPress Advanced Statistics](https://wordpress.org/plugins/bbpress-improved-statistics-users-online/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bbpress-improved-statistics-users-online/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bbpress-improved-statistics-users-online/)
 * [Active Topics](https://wordpress.org/support/plugin/bbpress-improved-statistics-users-online/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bbpress-improved-statistics-users-online/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bbpress-improved-statistics-users-online/reviews/)

 * 41 replies
 * 4 participants
 * Last reply from: [Jake Hall](https://wordpress.org/support/users/geekserve/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/cannot-delete-plugin-3/page/3/#post-8600076)
 * Status: resolved