• Resolved ocbroadband

    (@ocbroadband)


    Hi,

    Trying out the lite version. Looks pretty good. However, something appears to have gone south, and all the folders disappeared. I had 4 folders initially for 22 files. I ended up recreating them, but when I did, it appended a number, which tells me that the folders already existed, so I only created 2 of the 4 folders. After looking at the file counts, it’s off.

    All Files – 22
    Uncategorized – 3
    People – 14
    Images – 2

    Now, 3 + 14 + 2 doesn’t equal 22 as you can see, so something is hung up somewhere. I am using v2.3, and it was working for a few days. No changes to plugins or anything. So my question is, how can I either reset whatever table is being used to link the files to the folders, or wipe it all out, and reinstall from scratch. I didn’t see the option to remove all data upon uninstall, which btw, should be a requirement IMO.

    Thoughts?

    Lyle

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ninja Team

    (@ninjateam)

    Hi Lyle,

    Please try to clear cache (both server and browser cache). If that does not help, please use “Debug Info” plugin and give us the list of plugins, theme on your site. And a long with that, give us the screencast of how the issue occurs too.

    We will help check then.

    Kelly

    Thread Starter ocbroadband

    (@ocbroadband)

    Hi Kelly,

    Yea already did the cache refreshing everywhere I could.

    I just reinstalled and all the folders are gone. It now shows 19 uncategorized, and 22 for All Files, with no sub-folders.

    How exactly do I get these files to you?

    Plugin Author Ninja Team

    (@ninjateam)

    Hi Lyle,

    Please try this

    Go to media-folder-wp/includes/class-filebird-topbar.php
    look for this

    public static function get_uncategories_attachment()
       {
           global $sitepress;
           $is_wpml_active = $sitepress !== null && get_class($sitepress) === "SitePress";
           if ($is_wpml_active) {
               $settings = $sitepress->get_setting('custom_posts_sync_option', array());
               if ($settings['attachment']) {
                   return self::wpml_get_uncategories_attachment();
               }
           }
           // $args = array(
           //     'post_type' => 'attachment',
           //     'post_status' => 'inherit,private',
           //     'posts_per_page' => -1,
           //     'tax_query' => array
           //     (
           //         'relation' => 'AND',
           //         0 => array
           //         (
           //             'taxonomy' => NJT_FILEBIRD_FOLDER,
           //             'field' => 'id',
           //             'terms' => self::filebird_get_terms_values('ids'),
           //             'operator' => 'NOT IN',
           //         ),
           //     ),
           // );
           // $result = get_posts($args); //don't use WP_query in backend
           // return count($result);
           global $wpdb;
           $wp_posts = $wpdb->prefix . "posts";
           $term_relationships = $wpdb->prefix . 'term_relationships';
           $term_taxonomy = $wpdb->prefix . 'term_taxonomy';
           $result = $wpdb->get_var("SELECT COUNT(*)
             FROM $wp_posts AS posts
             WHERE 1=1 AND (posts.ID NOT IN
             (SELECT object_id FROM $term_relationships WHERE term_taxonomy_id IN(
               SELECT term_id from $term_taxonomy where taxonomy = 'nt_wmc_folder'))
             ) AND posts.post_type = 'attachment' AND ((posts.post_status = 'inherit' OR posts.post_status = 'private'))");
           return $result;
       }

    replace it by the one below

    public static function get_uncategories_attachment()
       {
     $args = array(
               'post_type' => 'attachment',
               'post_status' => 'inherit,private',
               'posts_per_page' => -1,
               'tax_query' => array
               (
                   'relation' => 'AND',
                   0 => array
                   (
                       'taxonomy' => NJT_FILEBIRD_FOLDER,
                       'field' => 'id',
                       'terms' => self::filebird_get_terms_values('ids'),
                       'operator' => 'NOT IN',
                   ),
               ),
           );
           $result = get_posts($args); //don't use WP_query in backend
           return count($result);
       }

    Let me know if this helps.

    Kelly

    Thread Starter ocbroadband

    (@ocbroadband)

    Replaced that section. Still has the following stats.

    No Subfolders displayed.

    22 files
    19 Uncategories

    When clicking between each of the 2 default folders, only 2 images appear less in uncategorized vs. all files. The total number of ‘visible’ images in the display is only 21. So I’m seeing a phantom count, and 2 of the images are attached to a non-visible folder it appears. The ‘uncategorized’ count is correct based on what it sees as not connected to another folder.

    Is there a way to clear the DB, or reset the counts? Sounds like a good feature request to parse through the numbers, or ‘reset’ the install to default. ??

    • This reply was modified 5 years, 2 months ago by ocbroadband.
    Thread Starter ocbroadband

    (@ocbroadband)

    Any suggestions?

    Thread Starter ocbroadband

    (@ocbroadband)

    I’m curious if the v2.4 update will fix any of this? I wouldn’t know as the changelog isn’t in sync with the version. ?? I’d like to use the plugin, but not getting at least a response for days doesn’t look good.

    • This reply was modified 5 years, 2 months ago by ocbroadband.
    Plugin Author Ninja Team

    (@ninjateam)

    Hi there,

    Sorry for late response, it seems that there are some files in the database (before you install FileBird) but they are not showed.

    Can you please send me your database including these tables for us to take a look?
    wp_posts
    wp_terms
    wp_term_taxonomy
    wp_term_relationships

    Or else, you can try clear database to start all over again.

    Kelly

    Thread Starter ocbroadband

    (@ocbroadband)

    Hi Kelly,

    I’m all for working with you and would rather not nuke it because of a plugin not working. How should I get this file to you?

    Lyle

    Plugin Author Ninja Team

    (@ninjateam)

    Hi there,

    That is relating to coding, so it will be hard for you to get the file.
    So the better way to solve this issue is you can start using the plugin in a total new environment, or else please accept that there are just 2-3 files which are hidden.
    All of new files you add from now on will be counted correctly.

    Best regards,
    Kelly

    Thread Starter ocbroadband

    (@ocbroadband)

    Ok, so you’re giving up on resolving the actual issue now? I was asking where to send the SQL file that ‘you’ asked for.

    I can’t just ‘start over’ on my site, that’s ridiculous… If I export the entire DB, then restore it, the problem will still be there I’m sure. Its something that the coding caused in the DB. My thought is the application should be able to be removed and remove all traces of what it does in the DB for just this issue, so only the plugin needs to be removed, and reinstalled, not affect the entire site.

    Kind of a let down considering this is a bug with the plugin and I was willing to work with you to help resolve the issue. Is it a major deal, no, I can just remove the plugin, and not recommend it. Unfortunate, I really liked it.

    Plugin Author Ninja Team

    (@ninjateam)

    Sorry for misunderstanding your question. You can send that file to our support mail here [email protected], we will resolve the issue for you.

    Kelly

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Folders not sync’d’ is closed to new replies.