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

Internal Error: Invalid identifier: TYPE #24

Open
DevPM99 opened this issue Oct 27, 2023 · 18 comments
Open

Internal Error: Invalid identifier: TYPE #24

DevPM99 opened this issue Oct 27, 2023 · 18 comments
Assignees
Labels
question Further information is requested

Comments

@DevPM99
Copy link

DevPM99 commented Oct 27, 2023

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?

@aljawaid
Copy link
Owner

Hi what version php?
What database?
Did you install the plugin from github or the directory in KB?

@aljawaid
Copy link
Owner

This could be related to #21

Possible Fix

Change TYPE to type:

@aljawaid aljawaid self-assigned this Oct 27, 2023
@aljawaid aljawaid added the question Further information is requested label Oct 27, 2023
@DevPM99
Copy link
Author

DevPM99 commented Oct 30, 2023 via email

@aljawaid
Copy link
Owner

aljawaid commented Nov 1, 2023

@DevPM99 Which version PHP are you using?

@aljawaid
Copy link
Owner

aljawaid commented Nov 1, 2023

@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.

@DevPM99
Copy link
Author

DevPM99 commented Nov 5, 2023

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?

@aljawaid
Copy link
Owner

aljawaid commented Nov 6, 2023

Do I need to enable special PHP plugins?

Try KanboardSupport (latest release v4.5, not master) to see if any php issues flag up

@DevPM99
Copy link
Author

DevPM99 commented Nov 6, 2023

Call to undefined function Kanboard\Plugin\KanboardSupport\Helper\posix_getpwuid() in ...WWWKanbanBoard\kanboard\plugins\KanboardSupport\Helper\SupportHelper.php:267

@DevPM99
Copy link
Author

DevPM99 commented Nov 6, 2023

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

@aljawaid
Copy link
Owner

aljawaid commented Nov 6, 2023

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

@DevPM99
Copy link
Author

DevPM99 commented Nov 7, 2023

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

@f8ttyc8t
Copy link

f8ttyc8t commented Mar 31, 2024

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.

Screenshot from 2024-03-31 11-00-14

@DevPM99
Copy link
Author

DevPM99 commented Apr 2, 2024

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!

@DevPM99
Copy link
Author

DevPM99 commented Apr 2, 2024

I think it's still the Windows / POSIX commands issue.

@f8ttyc8t
Copy link

f8ttyc8t commented Jun 3, 2024

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.

Screenshot from 2024-03-31 11-00-14

Btw. my instance is/was running on Debian 11, so not sure about Windows/POSIX command issue.

@kuhytitusdlz
Copy link

I have the same error TYPE on docker with sqlite db

@atlasveldine
Copy link

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.

@gururise
Copy link

Brand new docker install here as well and I also get the TYPE error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants