rotdrop / nextcloud-app-dokuwiki

NextCloud "app" which embeds an existing DokuWiki instance into NextCloud. Intended for SSO.
GNU Affero General Public License v3.0
7 stars 5 forks source link

How to make it work on NC26? #10

Open dzidek23 opened 1 year ago

dzidek23 commented 1 year ago

Hi, I've never seen this NC App before and it is such a great idea. We use DokuWiki for documentation and being able to tie both would be fantastic.

I was able to force install the app on NC 26.0.2 by changing the info.xml but it doesn't work beyond the admin panel. We have an icon appear on the top taskbar: image

There's admin config page: image

but it throws an error if I try to access it:



{"reqId":"VbKZlmmHTm7mN1btgS8c","level":3,"time":"2023-07-11T09:50:14+00:00","remoteAddr":"10.xx.xx.xx","user":"2FA20EFE-6C76-4FF9-8740-xxxx","app":"PHP","method":"GET","url":"/index.php/apps/dokuwiki/page/index","message":"Undefined array key 2 at /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php#298","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0","version":"26.0.2.1","data":{"app":"PHP"},"id":"64ad27c7553e1"}

[index] Error: Exception: xmlRequest(wiki.getPage) failed () at <<closure>>

 0. /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php line 274
    OCA\DokuWiki\Service\AuthDokuWiki->handleError()
 1. /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php line 488
    OCA\DokuWiki\Service\AuthDokuWiki->xmlRequest()
 2. /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php line 451
    OCA\DokuWiki\Service\AuthDokuWiki->getPage()
 3. /var/www/nextcloud/apps/dokuwiki/lib/Controller/PageController.php line 125
    OCA\DokuWiki\Service\AuthDokuWiki->refresh()
 4. /var/www/nextcloud/apps/dokuwiki/lib/Controller/PageController.php line 99
    OCA\DokuWiki\Controller\PageController->frame()
 5. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\DokuWiki\Controller\PageController->index()
 6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
 7. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
 8. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
 9. /var/www/nextcloud/lib/base.php line 1058
    OC\Route\Router->match()
10. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

Exception: XMLRPC request failed: Connect error: php_network_getaddresses: getaddrinfo for dokuwiki.xxx.xxx failed: Name or service not known (0) at <<closure>>

 0. /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php line 303
    OCA\DokuWiki\Service\AuthDokuWiki->handleError()
 1. /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php line 251
    OCA\DokuWiki\Service\AuthDokuWiki->doXmlRequest()
 2. /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php line 488
    OCA\DokuWiki\Service\AuthDokuWiki->xmlRequest()
 3. /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php line 451
    OCA\DokuWiki\Service\AuthDokuWiki->getPage()
 4. /var/www/nextcloud/apps/dokuwiki/lib/Controller/PageController.php line 125
    OCA\DokuWiki\Service\AuthDokuWiki->refresh()
 5. /var/www/nextcloud/apps/dokuwiki/lib/Controller/PageController.php line 99
    OCA\DokuWiki\Controller\PageController->frame()
 6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\DokuWiki\Controller\PageController->index()
 7. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
 8. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
10. /var/www/nextcloud/lib/base.php line 1058
    OC\Route\Router->match()
11. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /index.php/apps/dokuwiki/page/index
from 10.xx.xx.xx by 2FA20EFE-6C76-4FF9-8740-xxxxxxx at 2023-07-11T09:50:14+00:00```

Server config:
Debian 11
NC 26.0.2
PHP 8.2.7
dzidek23 commented 1 year ago

My initial problem seems to have been caused by XML-RPC not enabled on the dokuwiki. I'm a tad closer as I can see this: image but I must be missing something. Any idea what am I doing wrong?

{"reqId":"F0PfMcdkVOY6D7PolKel","level":3,"time":"2023-07-11T12:11:59+00:00","remoteAddr":"10.xx.xx.xx","user":"2FA20EFE-6C76-4FF9-8740-xxxxxx","app":"PHP","method":"GET","url":"/index.php/apps/dokuwiki/page/index","message":"Undefined array key \"path\" at /var/www/nextcloud/apps/dokuwiki/lib/Service/AuthDokuWiki.php#139","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0","version":"26.0.2.1","data":{"app":"PHP"},"id":"64ad48ae706a7"}

rotdrop commented 1 year ago

Hi there, I am actually working on NC 27 support (should also cover 26), but I am a little bit occupied with other things ATM.

Is this "files_scripts" error really related?

For the other error: that has been fixed by a3067da2. I have just uploaded a new pre-release.

For other things: you do have your DokuWiki instance in the same domain as you NC instance? Otherwise there are cross-domain iframe restriction (see README.md).

dzidek23 commented 1 year ago

rotdrop, you are absolutely right files_scripts has nothing to do with the dokuwiki integration. Will get that out in a minute :)

No, both apps run on separate machines and I'm probably missing some Apache2 redirections. README file states that this app is aimed at using SSO. If I don't (yet) have SSO enabled should I get to normal login page?

rotdrop commented 1 year ago

rotdrop, you are absolutely right files_scripts has nothing to do with the dokuwiki integration. Will get that out in a minute :)

No, both apps run on separate machines and I'm probably missing some Apache2 redirections. README file states that this app is aimed at using SSO. If I don't (yet) have SSO enabled should I get to normal login page?

I think so. You have read about these iframe things in the README?

dzidek23 commented 1 year ago

Yes, I've seen the proxy settings, will give that a try.

BTW thank you for making the app available and for your time answering silly questions :)

rotdrop commented 1 year ago

Good luck! And of course: it is kind of cool when other people use stuff I wrote :)

I have added the compiled assets to the stable26 and stable27 branches and added a pre-release with the current state of the master branch.

WWE-Corey commented 1 year ago

I'm running NC27 and just setup the TurnkeyLinux Dokuwiki but cannot seem to get it to load/login.

How did you get yours working?

My Nextcloud uses LDAP but for now I'd just like to get it to load using any means.

image