Update to 1.2.32: WIKI-plugin no longer works


Today I observed that in3 of my 4 KANBOARD installations WIKI pages can no longer be created or modified.

I did a quick test in my Test Installation:
After having replaced folders app, assets, libs, vendor by (very) old ones

Application Version 1.2.20 Installed on 10 April 2023
PHP Version 7.4.33
PHP SAPI fpm-fcgi
HTTP Client cURL
Server OS Linux 5.4.0-155-generic
Database Driver mysql
Database Version 10.5.22-MariaDB-1:10.5.22+maria~ubu2004-log
Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Wiki works fine again.

Error Logs from my main KANBOARD installation show entries like

[18-Sep-2023 11:49:08 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Symfony\Component\EventDispatcher\EventDispatcher::dispatch() must be an object, string given, called in /www/htdocs/w0075f62/tickets.kanban.bielefeldundbuss.de/plugins/Wiki/Model/WikiEventJob.php on line 42 and defined in /www/htdocs/w0075f62/tickets.kanban.bielefeldundbuss.de/vendor/symfony/event-dispatcher/EventDispatcher.php:48
Stack trace:
#0 /www/htdocs/w0075f62/tickets.kanban.bielefeldundbuss.de/plugins/Wiki/Model/WikiEventJob.php(42): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('wikipage.create', Object(Kanboard\Event\CommentEvent))
#1 /www/htdocs/w0075f62/tickets.kanban.bielefeldundbuss.de/plugins/Wiki/Model/Wiki.php(270): Kanboard\Plugin\Wiki\Model\WikiEventJob->execute('neue', '46', Array, 'wikipage.create')
#2 /www/htdocs/w0075f62/tickets.kanban.bielefeldundbuss.de/plugins/Wiki/Controller/WikiController.php(326): Kanboard\Plugin\Wiki\Model\Wiki->createpage('46', 'neue', 'wikilinie', '2023-09-18')
#3 /www/htdocs/w0075f62/tickets.kanban.bielef in /www/htdocs/w0075f62/tickets.kanban.bielefeldundbuss.de/vendor/symfony/event-dispatcher/EventDispatcher.php on line 48

Strange 1 (very small) installation does not show the problem.

All this only as an info fo now. I will do more research later.



The upgrade of symfony in KB31 was a breaking change, unfortunately.
The Wiki author should be able (and willing :wink:) to fix this ASAP.

1 Like

Ah, thx for info! Code in your Comment on on Aug 12 at Error creating a wiki page #60 is a patch that might solve the problem?

I think, yes. I will try to send you a patch for the wiki.

Here is your Patch.

This works for me. Good luck!

diff --git a/Model/WikiEventJob.php b/Model/WikiEventJob.php
index 5590cbc..4788f4f 100644
--- a/Model/WikiEventJob.php
+++ b/Model/WikiEventJob.php
@@ -26,6 +26,15 @@ class WikiEventJob extends BaseJob
         return $this;
+    private function dispatch($eventName, $event)
+    {
+        if (APP_VERSION < '1.2.31') {
+            $this->dispatcher->dispatch($eventName, $event);
+        } else {
+            $this->dispatcher->dispatch($event, $eventName);
+        }
+    }
      * Execute job
@@ -39,7 +48,7 @@ class WikiEventJob extends BaseJob
         if ($event !== null) {
-            $this->dispatcher->dispatch($eventName, $event);
+            $this->dispatch($eventName, $event);
             // if ($eventName === Wiki::EVENT_CREATE) {
             //     $userMentionJob = $this->userMentionJob->withParams($event['comment']['comment'], Wiki::EVENT_USER_MENTION, $event);
@@ -55,7 +64,7 @@ class WikiEventJob extends BaseJob
         if ($event !== null) {
-            $this->dispatcher->dispatch($eventName, $event);
+            $this->dispatch($eventName, $event);
             // if ($eventName === Wiki::EVENT_CREATE) {
             //     $userMentionJob = $this->userMentionJob->withParams($event['comment']['comment'], Wiki::EVENT_USER_MENTION, $event);
1 Like

Works fine in my test installation.
Thx a lot!

1 Like

You’re welcome! As usual.

Wiki 2.0 didn‘t work for me from the beginning. Is this about wiki 1.x? That would be a bummer

Wiki 2.0? :thinking:
The master branch is at 0.3.2, the dev branch is at 0.3.3.

 will try 0.3.2 again
0.3.1 was up to now the only working version

Michael Maaß

Org.-Z. 135
GeschÀftsbereich IT & Organisation
Fachbereich Digitalisierung
Bauen und Bewirtschaften
Telefon: 0431 599-1358
Telefax: 0431 599-1420

GebÀudemanagement Schleswig-Holstein AöR (GMSH)

KĂŒterstraße 30, 24103 Kiel | gmsh.de | karriere.gmsh.de

GeschĂ€ftsfĂŒhrer: Frank Eisoldt

HRA 3948 KI, Registergericht Kiel

pulled the dev and included it to my installation
 works like a charm

1 Like