Collabora: Cannot create new document when template function is offered by CODE4

nc14

#1

When the CODE Version offers the template capability, it is not possible to create new documents.
It is possible to create docs when the template capability is turned off (older version of CODE4).

Nextcloud log displays:
Error richdocuments Exception:

/var/www/nc/lib/private/AppFramework/Http/Dispatcher.php - line 166:

OCA\Richdocuments\Controller\DocumentController->index("-1")

/var/www/nc/lib/private/AppFramework/Http/Dispatcher.php - line 99:

OC\AppFramework\Http\Dispatcher->executeController(OCA\Richdocu ... {}, "index")

/var/www/nc/lib/private/AppFramework/App.php - line 118:

OC\AppFramework\Http\Dispatcher->dispatch(OCA\Richdocu ... {}, "index")

/var/www/nc/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OCA\\Richdo ... r", "index", OC\AppFramew ... {}, { _route: "r ... "})

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "r ... "})

/var/www/nc/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "r ... "})

/var/www/nc/lib/base.php - line 987:

OC\Route\Router->match("/apps/richdocuments/index")

/var/www/nc/index.php - line 42:

OC::handleRequest()

Browser console:
Uncaught Error: searchBox not available
at Search.initialize (search.js?v=57b5feb8-11:61)
at new Search (search.js?v=57b5feb8-11:37)
at Search.initialize (searchprovider.js?v=57b5feb8-11:384)
at new Search (searchprovider.js?v=57b5feb8-11:34)
at HTMLDivElement. (searchprovider.js?v=57b5feb8-11:422)
at Function.each (core.js?v=57b5feb8-11:2)
at a.fn.init.each (core.js?v=57b5feb8-11:2)
at Object. (core.js?v=57b5feb8-11:4)
at j (core.js?v=57b5feb8-11:2)
at Object.fireWith (core.js?v=57b5feb8-11:2)
/index.php/core/preview?fileId=12053&c=14f191e12d4852dde1bdbbfadd462d41&x=64&y=64&forceIcon=0:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/index.php/core/preview?fileId=12372&c=900cea6cf6814e6ff7ed8cf1d9fb3aaa&x=64&y=64&forceIcon=0:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/index.php/core/preview?fileId=8123&c=f7917152e750d5258294efb1c6d7f45a&x=64&y=64&forceIcon=0:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/index.php/core/preview?fileId=12236&c=9656262b17c188a0e12f4445ae8757c6&x=64&y=64&forceIcon=0:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/index.php/core/preview?fileId=12263&c=727ff340603e20afc63d33be0720e7a5&x=64&y=64&forceIcon=0:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/index.php/core/preview?fileId=12258&c=236b515ea39405fc381e2caf5fe6e021&x=64&y=64&forceIcon=0:1 Failed to load resource: the server responded with a status of 404 (Not Found)
index:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Apache log:
[Thu Jan 10 13:34:55.984554 2019] [php7:error] [pid 25147] [client 2a01:5c0:e08d:c21:a977:5233:253b:e106:56381] PHP Fatal error: Cannot declare class OCA\Richdocuments\Controller\DocumentController, because the name is already in use in /var/www/nc/apps/richdocuments/lib/Controller/DocumentController.php on line 0

Edit: The capabilities return:
{“convert-to”:{“available”:false},“hasTemplateSaveAs”:false,“version”:“4.0.0”}

Versions:

LOOLWSD

4.0.0 (git hash: 173510fd)

LOKit

Collabora OfficeDev 6.0-19 (git hash: 967880a)