nextcloud / cms_pico

🗃 Integrate Pico CMS and let your users manage their own websites
https://apps.nextcloud.com/apps/cms_pico
GNU Affero General Public License v3.0
133 stars 41 forks source link

1014 errors in the logs since 3. Juli 2024, 18:46:13 Undefined array key #249

Closed kruthoff closed 1 month ago

kruthoff commented 2 months ago

cms_pico produces many errors in nextcloud.log, such as

{"reqId":"KnV3So1DBNZHzppo8HZ9","level":3,"time":"2024-07-10T18:35:09+02:00","remoteAddr":"192.168.1.175","user":"<user>","app":"PHP","method":"GET","url":"/index.php/apps/cms_pico/pico_proxy/<site>/","message":"Undefined array key \"\" at /var/www/html/nextcloud/lib/private/AppFramework/Http.php#128","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0","version":"29.0.3.4","data":{"app":"PHP"}}

I'm running it with php-8.2. Does anybody know how this can be fixed? I assume it's not too complicated, but I'm not a php developer, unfortunately.

Any help is much appreciated.

PhrozenByte commented 1 month ago

Please provide a full stacktrace from the logfile of that error.

kruthoff commented 1 month ago

nextcloud-undefined-array-key [PHP] Error: Undefined array key "" at /var/www/html/nextcloud/lib/private/AppFramework/Http.php#128 GET /index.php/apps/cms_pico/pico_proxy/andreas_kruthoff/ from 194.195.253.114 by -- at 12.07.2024, 14:18:49

That's it.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

kruthoff commented 1 month ago

Error handling for this case if the array key is undefined, or figure out why the key is undefined and define it, maybe.

PhrozenByte commented 1 month ago

or figure out why the key is undefined and define it

You might figure that out, yes.

As I said, since I can't reproduce it and without you providing a full stacktrace, its literally impossible for me to find the root cause of this error thrown in Nextcloud's code. You might want to report the error in nextcloud/server, too; no matter what the app does, nextcloud/server should properly handle a non-existing key.

kruthoff commented 1 month ago

How can I provide a full stack trace? In loglevel 0, I get some more messages, but I don't know if it helps.

{"reqId":"14GfWWNsSVqREQLM13gN","level":0,"time":"2024-07-21T18:07:32+02:00","remoteAddr":"192.168.1.175","user":"andreas","app":"cms_pico","method":"GET","url":"/apps/files/api/v1/stats","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.4.1","data":{"app":"cms_pico"}}

and

{"reqId":"lkOkRMpFGDdrvRSHRHLk","level":0,"time":"2024-07-21T18:01:07+02:00","remoteAddr":"192.168.1.175","user":"andreas","app":"PHP","method":"GET","url":"/index.php/apps/cms_pico/pico_proxy/andreas_kruthoff/","message":"trim(): Passing null to parameter #1 ($string) of type string is deprecated at /var/www/html/nextcloud/apps/cms_pico/vendor/symfony/yaml/Inline.php#49","userAgent":"Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.4.1","data":{"app":"PHP"}}
{"reqId":"lkOkRMpFGDdrvRSHRHLk","level":0,"time":"2024-07-21T18:01:07+02:00","remoteAddr":"192.168.1.175","user":"andreas","app":"PHP","method":"GET","url":"/index.php/apps/cms_pico/pico_proxy/andreas_kruthoff/","message":"Function strftime() is deprecated at /var/www/html/nextcloud/apps/cms_pico/vendor/picocms/pico/lib/Pico.php#1527","userAgent":"Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.4.1","data":{"app":"PHP"}}
github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1: