Git Product home page Git Product logo

Comments (1)

praet0ri4n avatar praet0ri4n commented on September 3, 2024

I made custom research and found out, that the culprit lies in profound differencies in the versions maintained by Nextcloud, especially the 1.0.18
https://apps.nextcloud.com/apps/grauphel
and the current code state in this git repo..

The error above comes from missing ": SearchResult" in the
var/www/html/custom_apps/grauphel/lib/Search/Provider.php#44
file
public function search(OCP\IUser $user, OCP\Search\ISearchQuery $query)
and the correct way
public function search(IUser $user, ISearchQuery $query) : SearchResult
This file is from the official version 1.0.18. The Provider.php in this git codebase is correct.

By correcting the missing declaration there is a waterfall off other errors only revealing themselves after this fix.
The next is
Could not check compatibility between OCA\Grauphel\Search\Provider::search(OCA\Grauphel\Search\OCP\IUser $user, OCA\Grauphel\Search\OCP\Search\ISearchQuery $query): OCA\Grauphel\Search\OCP\Search\SearchResult and OCP\Search\IProvider::search(OCP\IUser $user, OCP\Search\ISearchQuery $query): OCP\Search\SearchResult, because class OCA\Grauphel\Search\OCP\IUser is not available at /var/www/html/custom_apps/grauphel/lib/Search/Provider.php#44
This again has to do with the "OCP\IUser" namespace declaration in the search function. It has to be "IUser" only.
Again this occurs only in official version.

After fixing IUser there is another one
Undefined constant OCA\Grauphel\AppInfo\Application::APP_ID in file '/var/www/html/custom_apps/grauphel/lib/Search/Provider.php' line 27
(fixed in current git code, it is a missing declaration in AppInfo/Application.php..)
and
Undefined constant OCA\Grauphel\Search\Provider::ORDER in file '/var/www/html/custom_apps/grauphel/lib/Search/Provider.php' line 46
which I did not find anywhere what it is meant to do. For testing I replaced
return self::ORDER;
with
return 1;
The self::ORDER constant is not being defined anywhere..

I updated the whole app code to this git code here but then there is another errors:
Undefined property: OCA\Grauphel\Search\Provider::$lutil at /var/www/html/custom_apps/grauphel/lib/Search/Provider.php#36
So again for the sake of testing i replaced
return $this->lutil->l10n->t('Grauphel');
with
return 'Grauphel';

Sorry for pasting all the errors and quirks here, but hopefully somebody makes use of it and maybe there is an update which could solve all this in one go.
Thank you grosjo for taking over this awesome project :)

from nextcloud-grauphel.

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.