Giter Site home page Giter Site logo

Comments (17)

e-alfred avatar e-alfred commented on August 24, 2024 1

Okay, the app is now fixed with 25407d0 and c4edc54 so it will work with Nextcloud 14. I will leave this open anyway because there surely will be some more changes over time.

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

Please also have a look at nextcloud/server#7827 for other dropped methods or use the app:code-check to highlight deprecated methods in the current code.

from ocdownloader.

e-alfred avatar e-alfred commented on August 24, 2024

Thanks for the info @MorrisJobke!

Is there a new PHPDoc for Nextcloud or is it still located at https://doc.owncloud.org/api/?

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

Is there a new PHPDoc for Nextcloud or is it still located at https://doc.owncloud.org/api/?

Best is to have a look at the code directly. Just look into the PR with the deleted code - for example: https://github.com/nextcloud/server/pull/7840/files#diff-152326d1a90608424fb90b9a3b29030cL55

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

Could you replace the OC_API constants in routes.php with the ones from OCP\API?

\OC_API::USER_AUTH

\OC_API::USER_AUTH

\OC_API::USER_AUTH

Or maybe migrate all three methods to the AppFramework?

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

See https://github.com/nextcloud/server/blob/ba87db3fccb40aa58d84d12932424c83a4db411f/lib/public/API.php#L49

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

See nextcloud/server#8788 for the removal of the private namespace constant.

from ocdownloader.

e-alfred avatar e-alfred commented on August 24, 2024

I fixed the deprecated constants with 217ae7c#diff-0e033fd8797499a87a6bf2ffccef5c3c. I am keeping a move to the AppFramework on my TODO list.

Thanks for the awesome community support!

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

Thanks for the awesome community support!

You are welcome :) Would be sad if it is a that easy fix that could avoid problems in the future ;)

from ocdownloader.

e-alfred avatar e-alfred commented on August 24, 2024

Yes, it is just that I can't always keep track of all important/serious changes, so it helps quite a bit.

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

Just want to ping you, @e-alfred 😉

from ocdownloader.

e-alfred avatar e-alfred commented on August 24, 2024

This should be fixed now.

from ocdownloader.

e-alfred avatar e-alfred commented on August 24, 2024

I have to reopen this because the OCP\API calls seem to be broken by a recent change making the API unusable. Maybe @MorrisJobke you can help me with that?

I am getting the following error message in my log:

{"reqId":"nwxEpX2tXmmmZvAnMPo4","level":3,"time":"2019-04-15T13:14:33+00:00","remoteAddr":"10.0.2.2","user":"--","app":"PHP","method":"POST","url":"\/ocs\/v1.php\/apps\/ocdownloader\/api\/version?format=json","message":"Error: Call to undefined method Exception::getResult() at \/var\/www\/nextcloud\/ocs\/v1.php#71","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/73.0.3683.88 Safari\/537.36 Vivaldi\/2.4.1488.36","version":"16.0.0.5"}

Testing a change to OC_API I get the following message:

{"reqId":"cwsXeNWU1uVB6stlKR4A","level":3,"time":"2019-04-15T13:16:36+00:00","remoteAddr":"10.0.2.2","user":"--","app":"no app in context","method":"POST","url":"\/ocs\/v1.php\/apps\/ocdownloader\/api\/version?format=json","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"theming.Theming.getJavascript\" as such route does not exist.","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":337,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["theming.Theming.getJavascript",{"v":"0"},1]},{"file":"\/var\/www\/nextcloud\/lib\/private\/URLGenerator.php","line":79,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["theming.Theming.getJavascript",{"v":"0"}]},{"file":"\/var\/www\/nextcloud\/apps\/theming\/appinfo\/app.php","line":48,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["theming.Theming.getJavascript",{"v":"0"}]},{"file":"\/var\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":261,"args":["\/var\/www\/nextcloud\/apps\/theming\/appinfo\/app.php"],"function":"require_once"},{"file":"\/var\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":154,"function":"requireAppFile","class":"OC_App","type":"::","args":[{"__class__":"OCP\\AppFramework\\App"}]},{"file":"\/var\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":127,"function":"loadApp","class":"OC_App","type":"::","args":["theming"]},{"file":"\/var\/www\/nextcloud\/ocs\/v1.php","line":56,"function":"loadApps","class":"OC_App","type":"::","args":[]}],"File":"\/var\/www\/nextcloud\/3rdparty\/symfony\/routing\/Generator\/UrlGenerator.php","Line":130,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/73.0.3683.88 Safari\/537.36 Vivaldi\/2.4.1488.36","version":"16.0.0.5"}

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

I am getting the following error message in my log:

Do you mind to show the code that is causing this?

from ocdownloader.

e-alfred avatar e-alfred commented on August 24, 2024

It is actually this code you also reffered to here #58 (comment):

\OCP\API::register(
and .

from ocdownloader.

MorrisJobke avatar MorrisJobke commented on August 24, 2024

The OCS API could be used with normal controllers by now. Registration is done in this way:

https://github.com/nextcloud/server/blob/bb58d12bcaf991530be1c526d5de78e473936734/apps/updatenotification/appinfo/routes.php#L29-L31

and the controller is a normal controller returning DataResponse's.

from ocdownloader.

e-alfred avatar e-alfred commented on August 24, 2024

Fixed by 49dd4af.

from ocdownloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.