Open DevPM99 opened 10 months ago
Hi what version php? What database? Did you install the plugin from github or the directory in KB?
This could be related to #21
Change TYPE
to type
:
Thanks. Renaming “TYPE” to “type” helps. However the next issue is:
“PHP Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\inetpub\wwwroot\WWWKanbanBoard\kanboard\plugins\ContentCleaner\Model\ApplicationCleaningModel.php on line 3
”
I’m really confused about the “plugin” / “plugins” folder mix-up.
The config says:
// Plugins directory define('PLUGINS_DIR', DIR.DIRECTORY_SEPARATOR.'plugins'); <= PLURAL “s”
But all plugins have this in their PHP files: “plugin” SINGULAR Like: “namespace Kanboard\Plugin\ContentCleaner\Model;”
What’s correct? Thanks
@DevPM99 Which version PHP are you using?
@DevPM99 In the directory, the folder is named as plugins
which is correct.
In every file associated with a plugin, the text is written as plugin
as the function and code is related to a single plugin.
it is runnin on: Windows Server 2019 PHP Version 8.2.11 Kanboard Master Zip V 1.2.33 No specific configuration so far. Do I need to enable special PHP plugins?
Do I need to enable special PHP plugins?
Try KanboardSupport (latest release v4.5, not master) to see if any php issues flag up
Call to undefined function Kanboard\Plugin\KanboardSupport\Helper\posix_getpwuid() in ...WWWKanbanBoard\kanboard\plugins\KanboardSupport\Helper\SupportHelper.php:267
after skipping the not available posix function I get: PHP Warning: Undefined array key "script_uri" in ...\KanboardSupport\Template\config_sections\user-config.php on line 38 PHP Warning: Undefined array key "SERVER_ADDR" in ...KanboardSupport\Template\config_sections\server-config.php on line 31 PHP Warning: Undefined array key "SERVER_ADDR" in ...KanboardSupport\Template\config_sections\server-config.php on line 39 PHP Warning: Undefined array key "HTTP_MOD_REWRITE" in ...KanboardSupport\Template\config_sections\server-config.php on line 161
hmmm... I will look into these issues but it will take time. I'm thinking its because of Windows Server or php8.2... as all my plugins are only tested on linux ubuntu and php 7.4/8.1
Before I switch to php 7.4 I suggest you look over your code for all posix and other linux functions and make them Windows compatible: https://stackoverflow.com/questions/2197366/how-to-install-posix-in-php My php skills are too low to check your code, sorry...
Your pluginmanager works, so I think it is not php but posix functions and upper/lower case issues in the database
Using PHP 8.2.5, I've replaced 'TYPE' by 'type' in lines #31 and #70 of file ApplicationCleaningModel.php (plugin version 1.0.0) and it seems to work. Anyway, I'm not sure the result is correct, because I'm getting a suspicious number of tables to be cleaned up.
After solving the „TYPE“ issue I get PHP Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\inetpub\wwwroot\WWWKanbanBoard\kanboard\plugins\ContentCleaner\Model\ApplicationCleaningModel.php on line 3
However, the path seems to be identical to other plugins... No idea what's going wrong!
I think it's still the Windows / POSIX commands issue.
Using PHP 8.2.5, I've replaced 'TYPE' by 'type' in lines #31 and #70 of file ApplicationCleaningModel.php (plugin version 1.0.0) and it seems to work. Anyway, I'm not sure the result is correct, because I'm getting a suspicious number of tables to be cleaned up.
Btw. my instance is/was running on Debian 11, so not sure about Windows/POSIX command issue.
I have the same error TYPE on docker with sqlite db
This occurs even in Docker with a brand new setup and nothing besides those three plugins installed.
Replicate easily by running latest docker image for kanboard, install Plugin Manager, ContentCleaner, and KanboardSupport.
KanboardSupport throws an error Warning: Undefined array key "SCRIPT_URI" in /var/www/app/plugins/KanboardSupport/Template/config_sections/user-config.php on line 38
in the Current Page
.
ContentCleaner throws Internal Error: Invalid identifier: TYPE
and refuses to display anything else.
I don't think this is related to Windows, given that the issue occurs even within Docker. I also tried running the image without named volumes for the data/plugins directories just to rule that out and it still has the same issues. That said, I am using a Windows host machine for Docker (WSL2 backend) so I guess it's possible, I'm not horribly familiar with the intricacies of Docker.
After installation with the latest KB and PHP on a clean Windows Server IIS, I get this error when calling the plugin: "Internal Error: Invalid identifier: TYPE" on a blank web page. Nothing else. What am I missing/doing wrong?