Several Problems after Upgrade from OC to NC

Hello,

I upgraded my Owncloud 8 Installation to Owncloud 9 and then to nextcloud up to the actual version.
First, i thought, without errors.

But the first one was an encryption error, the key size would been wrong.
Long story short, i deleted the files in the server and now i am reuploading them and I experience a few new errors.

The nextcloud installations runs on a Ubuntu 16.04.2 LTS Server with apache2.

Below are the latest logs.

Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:57:17+0200
Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:57:17+0200
Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:57:07+0200
Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:57:07+0200
Fatal	webdav	Sabre\DAV\Exception: HTTP/1.1 500 An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`parent`,`checksum`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params ["1", "2", 1495543711, -1, "59242f9f04b2a", 1495543711, 31, 1048191, "", "ae4b1b661279d4456559869100136976", "files_encryption\/keys\/files\/ocDev\/Ressourcen-Lizenziert\/pixelarity-complete\/px-transition-html\/red\/assets", "assets", 1, 1, "ae4b1b661279d4456559869100136976"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-ae4b1b661279d4456559869100136976' for key 'fs_storage_path_hash'	2017-05-23T14:48:31+0200
Fatal	webdav	Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing 'INSERT INTO `oc_file_locks` (`key`,`lock`,`ttl`) SELECT ?,?,? FROM `oc_file_locks` WHERE `key` = ? HAVING COUNT(*) = 0' with params ["files\/685fdab023aa0530ea42153bb71fce6f", -1, 1495546999, "files\/685fdab023aa0530ea42153bb71fce6f"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'files/685fdab023aa0530ea42153bb71fce6f' for key 'lock_key_index'	2017-05-23T14:43:19+0200
Fatal	webdav	Sabre\DAV\Exception: HTTP/1.1 500 An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`parent`,`checksum`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params ["1", "2", 1495543213, -1, "59242dad1e24e", 1495543213, 31, 1030716, "", "fc166d0ca27ed601455f00820462211a", "files_encryption\/keys\/files\/ocDev\/Ressourcen-Lizenziert\/pixelarity-complete\/px-indivisible-html\/green\/assets\/sass\/ie9.scss", "ie9.scss", 1, 1, "fc166d0ca27ed601455f00820462211a"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-fc166d0ca27ed601455f00820462211a' for key 'fs_storage_path_hash'	2017-05-23T14:40:13+0200
Fatal	webdav	Sabre\DAV\Exception: HTTP/1.1 500 An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`parent`,`checksum`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params ["1", "2", 1495543069, -1, "59242d1d3032a", 1495543069, 31, 1025861, "", "592be75c0eda9d2d8895118edf25d8ac", "files_encryption\/keys\/files\/ocDev\/Ressourcen-Lizenziert\/pixelarity-complete\/px-forward-html\/blue", "blue", 1, 1, "592be75c0eda9d2d8895118edf25d8ac"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-592be75c0eda9d2d8895118edf25d8ac' for key 'fs_storage_path_hash'	2017-05-23T14:37:49+0200
Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:25:35+0200
Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:25:35+0200
Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:25:20+0200
Error	admin_audit	$params["path"] was missing. Transferred value: Array ( [path] => ) 	2017-05-23T14:25:20+0200
Error	PHP	Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:78) at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php#63	2017-05-23T13:33:19+0200

Did you run all the upgrades without skipping major releases?
OC 8.0 -> OC 8.1 -> OC 8.2 (-> OC 9.0) -> NC 9 -> NC 10 -> NC 11

When you skip releases, some database updates are not done properly and can give similar errors. In that case go back to the backup you made before and run the upgrades properly.