Skip to content
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

"Undefined variable $not_editable" php warnings in kanboard wiki page #56

Closed
1 of 3 tasks
nya1 opened this issue Dec 6, 2022 · 5 comments · Fixed by #58
Closed
1 of 3 tasks

"Undefined variable $not_editable" php warnings in kanboard wiki page #56

nya1 opened this issue Dec 6, 2022 · 5 comments · Fixed by #58

Comments

@nya1
Copy link

nya1 commented Dec 6, 2022

This issue is:

  • Bug report
  • Feature request
  • Improvement

Actual behaviour

Many PHP warnings are displayed in Kanboard web app

Expected behaviour

No warnings are displayed

Steps to reproduce

  1. Run Kanboard 1.2.25 docker run -e PLUGIN_INSTALLER=true -d --name kanboard -p 80:80 -t kanboard/kanboard:v1.2.25
  2. Install kanboard-plugin-wiki via Plugin installer UI (web app)
  3. navigate to project, open wiki

Screenshots

example

Logs

PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/show.php on line 6"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/show.php on line 60"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/detail.php on line 1"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/detail.php on line 6"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/detail.php on line 38"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/detail.php on line 39"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/detail.php on line 55"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/detail.php on line 67"
PHP message: PHP Warning:  Undefined variable $not_editable in /var/www/app/plugins/Wiki/Template/wiki/detail.php on line 95"

Configuration

  • Kanboard version: 1.2.25
  • Plugin version: 0.3.2
  • Database type and version: sqlite
  • PHP version: 8.1.12
  • OS: Linux 5.4
  • Browser: Chrome
  • Application settings Language: English
@yunylz
Copy link

yunylz commented Dec 13, 2022

same here

@vlad34
Copy link

vlad34 commented Dec 29, 2022

same here ^^

@jlkDE
Copy link

jlkDE commented Jan 1, 2023

I took a quick glance at the update and came up with the following:

The variable $not_editable seems to be part of commit 695f148 which implemented a public mode for the wiki via settings this to true, but in the respective methods when viewing pages logged in the variable is not set to false (or maybe it should have been set by default, I have no real idea of PHP in general or Kanboard plugins).

Therefore I came up with the following patch, but as I have no knowledge of this I cannot give you a guarantee that this fixes the error for good:

#57

Please also note that the same applies to the variable $no_layout, but that one causes no error and it seems to make no difference to negate it explicitly.

@iulianraduat
Copy link

I confirm that applying @jlkDE changes locally my Wiki plugin works again.
So maybe we can speed up the code review process and merge the code (if it is OK) as soon as possible.
Thanks

@Webmasters-WPNGO
Copy link

Webmasters-WPNGO commented Mar 29, 2023

Thank you, your solution helps to remove the error! But unfortunately, after that, the buttons of the main menu, the project menu, do not work. And when you click on notifications, it goes to another page.

@creecros creecros mentioned this issue Mar 29, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants