-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error creating a wiki page #60
Comments
Synfony 4.3 has changed the signature of the EventDispatcherInterface::dispatch() method, changing the order of the parameters. It is necessary to modify the dispatch method in https://github.com/funktechno/kanboard-plugin-wiki/blob/dev/Model/WikiEventJob.php
|
Yes, but to avoid breaking with earlier versions of Kanboard: diff --git a/Model/WikiEventJob.php b/Model/WikiEventJob.php
index 5590cbc..3734cad 100644
--- a/Model/WikiEventJob.php
+++ b/Model/WikiEventJob.php
@@ -39,8 +39,11 @@ class WikiEventJob extends BaseJob
->buildEventWiki($wikiPage);
if ($event !== null) {
- $this->dispatcher->dispatch($eventName, $event);
-
+ if (APP_VERSION < '1.2.31') {
+ $this->dispatcher->dispatch($eventName,$event);
+ } else {
+ $this->dispatcher->dispatch($event, $eventName);
+ }
// if ($eventName === Wiki::EVENT_CREATE) {
// $userMentionJob = $this->userMentionJob->withParams($event['comment']['comment'], Wiki::EVENT_USER_MENTION, $event);
// $this->queueManager->push($userMentionJob); |
Seems I suffer from the same problem, see discourse forum "Update to 1.2.32: WIKI-plugin no longer works!" |
Seems a valid solution to both keep the backward compatibility and fix the new problem. Also, as I can see the symphony dependencies were actually updated in Kanboard v.1.2.31 |
You're wrong.
This means that the 31 was broken by the update. |
Thanks for describing how to fix the issue! Additionally, you should change line 58 of the same file [the one related to "public function executeWithId"] if you want to be able to delete any page. |
This issue is:
Actual behaviour
After clicking the save button when trying to create a wiki page no wiki page is created
Expected behaviour
A new wiki page is expected to be created
Steps to reproduce
Click on "New Wiki page", fill in "Title", "Content" and click "Save".
Screenshots
Logs
Fatal error: Uncaught TypeError: Symfony\Component\EventDispatcher\EventDispatcher::dispatch(): Argument #1 ($event) must be of type object, string given, called in /var/www/app/plugins/Wiki/Model/WikiEventJob.php on line 42 and defined in /var/www/app/vendor/symfony/event-dispatcher/EventDispatcher.php:48 Stack trace: #0 /var/www/app/plugins/Wiki/Model/WikiEventJob.php(42): Symfony\Component\EventDispatcher\EventDispatcher->dispatch() #1 /var/www/app/plugins/Wiki/Model/Wiki.php(270): Kanboard\Plugin\Wiki\Model\WikiEventJob->execute() #2 /var/www/app/plugins/Wiki/Controller/WikiController.php(326): Kanboard\Plugin\Wiki\Model\Wiki->createpage() #3 /var/www/app/app/Core/Controller/Runner.php(77): Kanboard\Plugin\Wiki\Controller\WikiController->save() #4 /var/www/app/app/Core/Controller/Runner.php(31): Kanboard\Core\Controller\Runner->executeController() #5 /var/www/app/index.php(9): Kanboard\Core\Controller\Runner->execute() #6 {main} thrown in /var/www/app/vendor/symfony/event-dispatcher/EventDispatcher.php on line 48
Configuration
The text was updated successfully, but these errors were encountered: