[SOLVED] Missing or broken RSS folder - how to repair?

I’ve migrated the data from a ZCP 7 install to a fresh KC 8 and the errors that i have with a couple of users has been migrated across. This is good in that it shows that the data is the problem.

One particular oddity is a broken or missing RSS folder.
If i run the python script to change the localised folder names on a good user i get:

python localise-folders.py -u foo --lang en_gb
foo
foo: Changing localized folder names to "en_gb"
junk
tasks
journal
wastebasket
inbox
sentmail
outbox
calendar
rss
drafts
contacts
notes
suggested_contacts

If i run it on the user with the broken rss folder i get:

python localise-folders.py -u foo2 --lang en_gb
foo2
foo2: Changing localized folder names to "en_gb"
junk
tasks
journal
wastebasket
inbox
sentmail
outbox
calendar
rss
Traceback (most recent call last):
  File "localise-folders.py", line 119, in <module>
    main()
  File "localise-folders.py", line 112, in main
    folderobject.prop(PR_DISPLAY_NAME).set_value(localizedname)
AttributeError: 'NoneType' object has no attribute 'prop'

Anyone know how to correctly recreate the rss folder?

G

There are other odd things with the foo2 user’s store too.
I created a Contacts folder with the recreate system folder python script and the folder is listed in webapp but isn’t listed using the listfolders.php in z-push.

php /usr/share/z-push/backend/kopano/listfolders.php -l foo2
Available folders in store 'foo2':
--------------------------------------------------
Folder name:	Suggested Contacts
Folder ID:	019026a9ffa5497a8db81d23c9a23ee074aa02000000
Type:		SYNC_FOLDER_TYPE_USER_CONTACT

Folder name:	Junk E-mail
Folder ID:	019026a9ffa5497a8db81d23c9a23ee06daa02000000
Type:		SYNC_FOLDER_TYPE_USER_MAIL

Folder name:	Tasks
Folder ID:	019026a9ffa5497a8db81d23c9a23ee06caa02000000
Type:		SYNC_FOLDER_TYPE_USER_TASK

Folder name:	Notes
Folder ID:	019026a9ffa5497a8db81d23c9a23ee06baa02000000
Type:		SYNC_FOLDER_TYPE_USER_NOTE

Folder name:	Drafts
Folder ID:	019026a9ffa5497a8db81d23c9a23ee069aa02000000
Type:		SYNC_FOLDER_TYPE_USER_MAIL

Folder name:	Calendar
Folder ID:	019026a9ffa5497a8db81d23c9a23ee068aa02000000
Type:		SYNC_FOLDER_TYPE_USER_APPOINTMENT

Folder name:	Sent Items
Folder ID:	019026a9ffa5497a8db81d23c9a23ee066aa02000000
Type:		SYNC_FOLDER_TYPE_USER_MAIL

Folder name:	Deleted Items
Folder ID:	019026a9ffa5497a8db81d23c9a23ee065aa02000000
Type:		SYNC_FOLDER_TYPE_USER_MAIL

Folder name:	Inbox
Folder ID:	019026a9ffa5497a8db81d23c9a23ee063aa02000000
Type:		SYNC_FOLDER_TYPE_USER_MAIL

G

@Galen honestly i would either comment out the rss folder from the localise-folders script, or extend https://stash.kopano.io/projects/KSC/repos/core-tools/browse/recreate-systemfolders.py to also create the rss folder.

I don’t think there is any recent client that is making use of that folder.

That’s fair enough for the RSS folder.

Any idea why the Contacts folder isn’t listed by listfolders.php?

G

@Galen we had a while ago an effect in Z-Push that the script specifically only listed folders with a folderid of a given length, but since creating the script the folderid got longer.

Since you are not specifying your versions that could be the case.

With z-push 2.3.7 PHP-MAPI 8.4.0.-1004 listfolders.php doesn’t list the newly created contact folder.

Trying to create Contacts didn’t work initially. I had to create a folder with a different name before Contacts didn’t return an error.

python recreate-systemfolders.py --user foo.old --create Contacts --systemfolder contacts

User('foo.old')
create tmp folder Contacts
Traceback (most recent call last):
  File "recreate-systemfolders.py", line 103, in <module>
    main()
  File "recreate-systemfolders.py", line 52, in main
    tmp = user.store.subtree.create_folder(str(name))
  File "/usr/lib/python2.7/dist-packages/kopano/folder.py", line 508, in create_folder
    folder = self.folder(path, create=True)
  File "/usr/lib/python2.7/dist-packages/kopano/folder.py", line 432, in folder
    path = getattr(self.store, ENGLISH_FOLDER_MAP[path]).name
AttributeError: 'NoneType' object has no attribute 'name'

This worked:
python recreate-systemfolders.py --user foo.old --create Cont --systemfolder contacts

Trying to create Contacts after the Cont folder was created appears to work but the folder doesn’t show in webapp.

python recreate-systemfolders.py --user foo.old --create Contacts --systemfolder contacts

User('foo.old')
create tmp folder Contacts
Promote new folder to be a system folder

This user looks pretty broken. I think migrating the messages to a fresh user is my best option - if i get to resolve the issues i posted in my other thread.

G

For anyone that comes across this thread after searching for how to fix/repair user accounts:

Export the broken user account with kopano-backup
Rename or remove broken user with kopano-admin
Create new user with required password etc with kopano-admin
Restore user data with kopano-backup

All folders are recreated and the old data is overlaid.

G