Can't fix bug in OwnNote app for v14 beta

Hey all, until NextNote is ready, I’m trying to migrate OwnNote over to Nextcloud 14. Usually the update of the max-version in info.xml is enough, but it seems that’s not the case this time around.

My problem is here:

It seems in v9 the function was changed (

OCP\Util::linkToRoute has been deprecated in favour of \OCP\IURLGenerator::linkToRoute

However, if I try to use the new function:

'href' => \OCP\IURLGenerator::linkToRoute(''),

I get an error:

"Exception":"Error","Message":"Non-static method OCP\\IURLGenerator::linkToRoute() cannot be called statically"

I’ve tried other variations of the call to make this work. I’m not interested in doing a full migration as I’m also working through the mobile app for NextNote as a replacement already. I just need it to hold over until NextNote is complete.

Any ideas? Thanks!

OK, figured out I needed:

'href' => \OC::$server->getURLGenerator()->linkToRoute(''),

Now I’m getting errors about Class 'OCP\\DB' not found. Hrm…

And figured it out. For anyone having similar issues, see this commit: