Dokuwiki nextcloud integration

The Basics

  • Nextcloud Server version: 28.0.14.1
  • Operating system and version: Debian GNU/Linux 12 (bookworm)
  • Web server and version: Apache(the docker image default)
  • Reverse proxy and version: NPM v2.12.2
  • PHP version: PHP 8.2.27
  • Is this the first time you’ve seen this error? Yes
  • When did this problem seem to first start? After installing the app
  • Installation method Docker image
  • Are you using Cloudflare, mod_security, or similar? No

Summary of the issue you are facing:

The Dokuwiki integration app isn’t working with my nextcloud setup.

I have a VM on Proxmox in which the nextcloud instance and the dokuwiki are installed via Docker container. The proxmox has a Nginx Proxy Manager as Reverse Proxy. There are 2 domains cloud.example.domain.com, for the nextcloud, and wiki.example.domain.com, for the dokuwiki.

Steps to replicate it:

  • Have a working dokuwiki instance. In my case using docker
  • Setup on the dokuwiki instance AuthPDO
  • Install dokuwiki integration app on the nextcloud instance
  • Configure it so it’s able to acess the dokuwiki domain
  • Try access

Log entries

Nextcloud

Internal Server Error

The server was unable to complete your request.

If this happens again, please send the technical details below to your server administrator.

More details can be found in the server log.
{
    "reqId":"I1qVDR8ysnp8GYRkw4t5",
    "level":3,
    "time":"2025-03-10T15:00:18+00:00",
    "remoteAddr":"45.238.165.126",
    "user":"admin",
    "app":"index",
    "method":"GET",
    "url":"/apps/dokuwiki/page/index",
    "message":"xmlRequest(wiki.getPage) failed (-1)",
    "userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0",
    "version":"28.0.14.1",
    "exception":{
       "Exception":"Exception",
       "Message":"xmlRequest(wiki.getPage) failed (-1)",
       "Code":0,
       "Trace":[
          {
             "file":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
             "line":255,
             "function":"handleError",
             "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
             "type":"->",
             "args":[
                "xmlRequest(wiki.getPage) failed (-1)",
                {
                   "__class__":"Exception"
                }
             ]
          },
          {
             "file":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
             "line":469,
             "function":"xmlRequest",
             "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
             "type":"->",
             "args":[
                "wiki.getPage",
                [
                   ""
                ]
             ]
          },
          {
             "file":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
             "line":432,
             "function":"getPage",
             "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
             "type":"->",
             "args":[
                ""
             ]
          },
          {
             "file":"/var/www/html/custom_apps/dokuwiki/lib/Controller/PageController.php",
             "line":102,
             "function":"refresh",
             "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
             "type":"->",
             "args":[
                
             ]
          },
          {
             "file":"/var/www/html/custom_apps/dokuwiki/lib/Controller/PageController.php",
             "line":76,
             "function":"frame",
             "class":"OCA\\DokuWiki\\Controller\\PageController",
             "type":"->",
             "args":[
                "user"
             ]
          },
          {
             "file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
             "line":230,
             "function":"index",
             "class":"OCA\\DokuWiki\\Controller\\PageController",
             "type":"->",
             "args":[
                
             ]
          },
          {
             "file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
             "line":137,
             "function":"executeController",
             "class":"OC\\AppFramework\\Http\\Dispatcher",
             "type":"->",
             "args":[
                {
                   "__class__":"OCA\\DokuWiki\\Controller\\PageController"
                },
                "index"
             ]
          },
          {
             "file":"/var/www/html/lib/private/AppFramework/App.php",
             "line":184,
             "function":"dispatch",
             "class":"OC\\AppFramework\\Http\\Dispatcher",
             "type":"->",
             "args":[
                {
                   "__class__":"OCA\\DokuWiki\\Controller\\PageController"
                },
                "index"
             ]
          },
          {
             "file":"/var/www/html/lib/private/Route/Router.php",
             "line":315,
             "function":"main",
             "class":"OC\\AppFramework\\App",
             "type":"::",
             "args":[
                "OCA\\DokuWiki\\Controller\\PageController",
                "index",
                {
                   "__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"
                },
                {
                   "_route":"dokuwiki.page.index"
                }
             ]
          },
          {
             "file":"/var/www/html/lib/base.php",
             "line":1069,
             "function":"match",
             "class":"OC\\Route\\Router",
             "type":"->",
             "args":[
                "/apps/dokuwiki/page/index"
             ]
          },
          {
             "file":"/var/www/html/index.php",
             "line":39,
             "function":"handleRequest",
             "class":"OC",
             "type":"::",
             "args":[
                
             ]
          }
       ],
       "File":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
       "Line":189,
       "Previous":{
          "Exception":"Exception",
          "Message":"XMLRPC request failed: Empty or invalid page ID given",
          "Code":0,
          "Trace":[
             {
                "file":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
                "line":284,
                "function":"handleError",
                "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
                "type":"->",
                "args":[
                   "XMLRPC request failed: Empty or invalid page ID given"
                ]
             },
             {
                "file":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
                "line":232,
                "function":"doXmlRequest",
                "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
                "type":"->",
                "args":[
                   "wiki.getPage",
                   [
                      ""
                   ]
                ]
             },
             {
                "file":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
                "line":469,
                "function":"xmlRequest",
                "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
                "type":"->",
                "args":[
                   "wiki.getPage",
                   [
                      ""
                   ]
                ]
             },
             {
                "file":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
                "line":432,
                "function":"getPage",
                "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
                "type":"->",
                "args":[
                   ""
                ]
             },
             {
                "file":"/var/www/html/custom_apps/dokuwiki/lib/Controller/PageController.php",
                "line":102,
                "function":"refresh",
                "class":"OCA\\DokuWiki\\Service\\AuthDokuWiki",
                "type":"->",
                "args":[
                   
                ]
             },
             {
                "file":"/var/www/html/custom_apps/dokuwiki/lib/Controller/PageController.php",
                "line":76,
                "function":"frame",
                "class":"OCA\\DokuWiki\\Controller\\PageController",
                "type":"->",
                "args":[
                   "user"
                ]
             },
             {
                "file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
                "line":230,
                "function":"index",
                "class":"OCA\\DokuWiki\\Controller\\PageController",
                "type":"->",
                "args":[
                   
                ]
             },
             {
                "file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
                "line":137,
                "function":"executeController",
                "class":"OC\\AppFramework\\Http\\Dispatcher",
                "type":"->",
                "args":[
                   {
                      "__class__":"OCA\\DokuWiki\\Controller\\PageController"
                   },
                   "index"
                ]
             },
             {
                "file":"/var/www/html/lib/private/AppFramework/App.php",
                "line":184,
                "function":"dispatch",
                "class":"OC\\AppFramework\\Http\\Dispatcher",
                "type":"->",
                "args":[
                   {
                      "__class__":"OCA\\DokuWiki\\Controller\\PageController"
                   },
                   "index"
                ]
             },
             {
                "file":"/var/www/html/lib/private/Route/Router.php",
                "line":315,
                "function":"main",
                "class":"OC\\AppFramework\\App",
                "type":"::",
                "args":[
                   "OCA\\DokuWiki\\Controller\\PageController",
                   "index",
                   {
                      "__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"
                   },
                   {
                      "_route":"dokuwiki.page.index"
                   }
                ]
             },
             {
                "file":"/var/www/html/lib/base.php",
                "line":1069,
                "function":"match",
                "class":"OC\\Route\\Router",
                "type":"->",
                "args":[
                   "/apps/dokuwiki/page/index"
                ]
             },
             {
                "file":"/var/www/html/index.php",
                "line":39,
                "function":"handleRequest",
                "class":"OC",
                "type":"::",
                "args":[
                   
                ]
             }
          ],
          "File":"/var/www/html/custom_apps/dokuwiki/lib/Service/AuthDokuWiki.php",
          "Line":189
       },
       "message":"xmlRequest(wiki.getPage) failed (-1)",
       "exception":[
          
       ],
       "CustomMessage":"xmlRequest(wiki.getPage) failed (-1)"
    },
    "id":"67cefe87f1288"
 }

The error seems to be caused by the “refresh” function on the app that triggers a error on the “xmlRequest” function

OCA\DokuWiki\Service\AuthDokuWiki->xmlRequest(
  "wiki.getPage",
  [
    ""
  ]
)
OCA\DokuWiki\Service\AuthDokuWiki->handleError(
  "xmlRequest(wiki.getPage) failed (-1)",
  {
    "__class__": "Exception"
  }
)

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

Wiki Proxy Host Access Log
[10/Mar/2025:14:54:24 +0000] - 200 200 - POST https wiki.example.domain.com "/lib/exe/xmlrpc.php" [Client 192.168.1.1] [Length 384] [Gzip -] [Sent-to 192.168.1.130] "XML-RPC for PHP 4.10.1" "-"

Cloud Proxy Host Access Log
[10/Mar/2025:14:54:24 +0000] - 500 500 - GET https cloud.example.domain.com "/apps/dokuwiki/page/index" [Client x.x.x.x] [Length 2588] [Gzip -] [Sent-to 192.168.1.130] "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0" "-"
[10/Mar/2025:14:54:25 +0000] - - 499 - GET https cloud.example.domain.com "/apps/theming/icon?v=fc2e1247" [Client x.x.x.x] [Length 0] [Gzip -] [Sent-to 192.168.1.130] "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0" "-"
[10/Mar/2025:14:54:25 +0000] - - 499 - GET https cloud.example.domain.com "/apps/theming/favicon?v=fc2e1247" [Client x.x.x.x] [Length 0] [Gzip -] [Sent-to 192.168.1.130] "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0" "-"
[10/Mar/2025:14:54:28 +0000] - 304 304 - GET https cloud.example.domain.com "/ocs/v2.php/apps/notifications/api/v2/notifications" [Client x.x.x.x] [Length 0] [Gzip -] [Sent-to 192.168.1.130] "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0" "-"

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):
Config list System

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.14.1",
        "overwrite.cli.url": "https:\/\/cloud.example.domain.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "cloud.example.domain.com",
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "log.backtrace": true,
        "loglevel": "0",
        "maintenance": false
    }
}

Config list Dokuwiki

        "dokuwiki": {
            "authenticationRefreshInterval": "1200",
            "enabled": "yes",
            "externalLocation": "https:\/\/wiki.example.domain.com",
            "installed_version": "1.0.3",
            "types": ""
        },

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 2.20.0
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.2
  - dokuwiki: 1.0.3
  - external: 5.3.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.4
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.2
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_oidc: 6.3.1
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - bruteforcesettings: 2.8.0
  - encryption: 2.16.0
  - files_external: 1.20.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0 (installed 1.17.0)

You missed the support template .

Is probably version 29 or higher and that’s why it doesn’t work.

Thank you. I updated the post.