Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Orphaned search folders?

    Kopano Groupware Core
    3
    14
    2276
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tobydox
      tobydox @mark dufour last edited by

      @mark-dufour said in Orphaned search folders?:

      does the following give a hint where these searchfolders might be located…?

      Unluckily not. It’s also not in the public store and I iterated over all items in all folders in all stores and none have the hierarchyids in question. Here are some more details directly from the DB:

      mysql> SELECT * FROM tproperties WHERE hierarchyid=6240779;
      +----------+-------------+-------+------+-----------+----------------------+------------+------------+-------------+----------+------------+
      | folderid | hierarchyid | tag   | type | val_ulong | val_string           | val_binary | val_double | val_longint | val_hi   | val_lo     |
      +----------+-------------+-------+------+-----------+----------------------+------------+------------+-------------+----------+------------+
      |        4 |     6240779 | 12289 |   30 |      NULL | WebApp Search Folder | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 12295 |   64 |      NULL | NULL                 | NULL       |       NULL |        NULL | 30611463 | 1282285952 |
      |        4 |     6240779 | 12296 |   64 |      NULL | NULL                 | NULL       |       NULL |        NULL | 30611463 | 1282285952 |
      |        4 |     6240779 | 13825 |    3 |         2 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 13826 |    3 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 13827 |    3 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 13834 |   11 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 13847 |    3 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 26168 |    3 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 26176 |    3 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 26177 |    3 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      |        4 |     6240779 | 26179 |    3 |         0 | NULL                 | NULL       |       NULL |        NULL |     NULL |       NULL |
      +----------+-------------+-------+------+-----------+----------------------+------------+------------+-------------+----------+------------+
      12 rows in set (0.00 sec)
      
      1 Reply Last reply Reply Quote 0
      • mark dufour
        mark dufour last edited by

        which folder is the one with hierarchyid 4 (the parent of the searchfolder, according to the DB)…?

        tobydox 1 Reply Last reply Reply Quote 0
        • tobydox
          tobydox @mark dufour last edited by

          @mark-dufour said in Orphaned search folders?:

          which folder is the one with hierarchyid 4 (the parent of the searchfolder, according to the DB)…?

          mysql> SELECT * FROM hierarchy WHERE id=4;
          +----+--------+------+-------+-------+
          | id | parent | type | flags | owner |
          +----+--------+------+-------+-------+
          |  4 |      3 |    3 |     0 |     1 |
          +----+--------+------+-------+-------+
          1 row in set (0.00 sec)
          
          mysql> SELECT * FROM hierarchy WHERE id=3;
          +----+--------+------+-------+-------+
          | id | parent | type | flags | owner |
          +----+--------+------+-------+-------+
          |  3 |   NULL |    1 |     0 |     1 |
          +----+--------+------+-------+-------+
          1 row in set (0.00 sec)
          
          mysql> SELECT * FROM users WHERE id=1;
          +----+----------+-------------+-----------+---------+
          | id | externid | objectclass | signature | company |
          +----+----------+-------------+-----------+---------+
          |  1 | NULL     |      196610 |           |       0 |
          +----+----------+-------------+-----------+---------+
          1 row in set (0.00 sec)
          
          1 Reply Last reply Reply Quote 0
          • mark dufour
            mark dufour last edited by

            I’d like to know the folder name as well (eg. ‘FIND_ROOT’)… what does the script I pasted above say about ‘hierarchy 4’…?

            tobydox 1 Reply Last reply Reply Quote 0
            • tobydox
              tobydox @mark dufour last edited by

              @mark-dufour said in Orphaned search folders?:

              I’d like to know the folder name as well (eg. ‘FIND_ROOT’)… what does the script I pasted above say about ‘hierarchy 4’…?

              It doesn’t appear as it’s the public store:

              store = kopano.Server().public_store
              print store.hierarchyid, store.findroot.hierarchyid
              

              gives

              3 6241326
              

              while iterating over all folders of the public store just returns our public contact folders and calendars.

              1 Reply Last reply Reply Quote 0
              • mark dufour
                mark dufour last edited by

                ok, so that’s why searchfolder_delete.py didn’t see it…

                do you see the folder(s) like this:

                for folder in kopano.public_store.findroot.folders():
                    print folder, folder.hierarchyid
                

                if so you sholud be able to delete them as follows:

                findroot.delete(folder)
                
                tobydox 1 Reply Last reply Reply Quote 0
                • tobydox
                  tobydox @mark dufour last edited by

                  @mark-dufour said in Orphaned search folders?:

                  for folder in kopano.public_store.findroot.folders():
                  print folder, folder.hierarchyid

                  This just gives

                  Folder(WebApp Search Folder) 6241385
                  Folder(WebApp Search Folder1) 6241386
                  Folder(WebApp Search Folder10) 6248108
                  Folder(WebApp Search Folder11) 6248167
                  Folder(WebApp Search Folder12) 6248168
                  Folder(WebApp Search Folder13) 6248308
                  Folder(WebApp Search Folder14) 6246205
                  Folder(WebApp Search Folder15) 6248449
                  Folder(WebApp Search Folder16) 6246895
                  Folder(WebApp Search Folder17) 6246900
                  Folder(WebApp Search Folder18) 6246922
                  Folder(WebApp Search Folder19) 6250024
                  Folder(WebApp Search Folder2) 6241387
                  ....
                  

                  but the folder IDs in question are not listed.

                  1 Reply Last reply Reply Quote 0
                  • mark dufour
                    mark dufour last edited by mark dufour

                    hmm. maybe the folders are ‘hidden’ because of some rights issue… but it’s a bit difficult to debug like this. would it be possible to have a look around on your system perhaps, using SSH/teamviewer…?

                    tobydox 1 Reply Last reply Reply Quote 0
                    • tobydox
                      tobydox @mark dufour last edited by

                      @mark-dufour said in Orphaned search folders?:

                      TeamViewer would work. I’ll contact you via chat.

                      1 Reply Last reply Reply Quote 0
                      • tobydox
                        tobydox last edited by

                        We tracked down the issue to search folders being erroneously being created in the root of the public store, probably orphans from the migration from Zarafa to Kopano where the public store did not have a FINDROOT. The script used for deleting these orphans:

                        import kopano
                        
                        for folder in kopano.Server().public_store.root.folders():
                            if folder.hierarchyid==NNNNNNN and folder.prop(PR_FOLDER_TYPE).value == 2:
                                print folder.hierarchyid
                                findroot.delete(folder)
                        
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post