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

Adding functionalities needed for most organization #30

Merged
merged 4 commits into from
Jan 30, 2023

Conversation

jatmika-com
Copy link
Contributor

Hi,

I'm currently using this wonderful plugin and applied some adjustment to make life easier for teams/organizations who want to flexibly reporting their tasks.

Check it out if this is suitable for an addition, otherwise I will just keep it at my fork.

@creecros
Copy link
Owner

sounds cool, I'll give it a looksie.

@creecros
Copy link
Owner

PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
2023/01/30 14:12:14 [error] 15#15: *414 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /?controller=PrintTaskController&action=printProjectPerUserOpen&plugin=task2pdf&project_id=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.1.2:41111",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
2023/01/30 14:12:17 [error] 15#15: *414 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /?controller=PrintTaskController&action=printProjectPerUserOpen&plugin=task2pdf&project_id=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.1.2:41111",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
2023/01/30 14:12:58 [error] 15#15: *414 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /?controller=PrintTaskController&action=printProjectPerUser&plugin=task2pdf&project_id=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.1.2:41111",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
2023/01/30 14:13:08 [error] 15#15: *414 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /?controller=PrintTaskController&action=printProjectPerUserOpen&plugin=task2pdf&project_id=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.1.2:41111",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264",
2023/01/30 14:13:11 [error] 15#15: *414 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Undefined variable $project in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264PHP message: PHP Warning:  Trying to access array offset on value of type null in /var/www/app/plugins/Task2pdf/Controller/PrintTaskController.php on line 264" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /?controller=PrintTaskController&action=printProjectPerUserOpen&plugin=task2pdf&project_id=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.1.2:41111"

@creecros
Copy link
Owner

@jatmika-com
Copy link
Contributor Author

Hi, sorry just check that after I refactored the methods for handling the call from print_project.php I forget to pass the $project variable to printProject method as parameter.

Weirdly, it works well in my production environment with PHP 8.0.22.
image

I already make the fix in my fork by passing $project variabel and tested the functionality again in my production environment and it work just as well as before.
image

So where should we go from here?

@creecros
Copy link
Owner

It works fine now.

I can assure you though, it do not work before the edit on:
Configuration
Application version: v1.2.26
PHP version: 8.1.14
PHP SAPI: fpm-fcgi
HTTP Client: cURL
OS version: Linux 5.10.102.1-microsoft-standard-WSL2
Database driver: sqlite
Database version: 3.40.1
Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

And very doubtful it worked on yours as it was. That's a hard impossible, the variable simply was not passed, it's not going to make it up. Possible you had made the edit on your server and just didn't commit it? I don't know. Doesn't matter though, it's fine now.

@creecros creecros merged commit 91a497c into creecros:master Jan 30, 2023
creecros added a commit that referenced this pull request Jan 30, 2023
@jatmika-com
Copy link
Contributor Author

Ah, my bad then. Hope it going well forward. Thx you for responding and accepting my pull request. Cheers 😄

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

Successfully merging this pull request may close these issues.

2 participants