bnomei / kirby3-pageviewcounter

Track Page view count and last visited timestamp
https://forum.getkirby.com/t/kirby3-pageview-counter-track-page-view-count-and-last-visited-timestamp/23582
MIT License
22 stars 0 forks source link

[K4] Cannot access offset of type string on string #6

Closed afbora closed 8 months ago

afbora commented 1 year ago

I'm not sure this issue related with K4.

screen-capture-1746-Kirby CMS Debugger-plugins test

Plugin 1.5.0 Kirby 4.0.0-rc.2 PHP 8.1.23 Windows 10 XAMPP

bnomei commented 1 year ago

i can not replicate but i upgraded dependencies and did a test on k4 myself without having issues (osx, php8.2, herd)

afbora commented 1 year ago

Still same. Could you access to pixel image address, please? plugins.test/plugins/pageviewcounter/counter-pixel

I'm getting console error:

GET http://plugins.test/plugins/pageviewcounter/counter-pixel 500 (Internal Server Error)

bnomei commented 9 months ago

maybe your local server can not create the png on the fly using the php libs? try echo ing out an empty string and exit instead.

https://github.com/bnomei/kirby3-pageviewcounter/blob/d7dfcbcb81d7f12582a619b674fe20bfeaa12311/classes/PageViewCounter.php#L77

bnomei commented 9 months ago

i added a try/catch with dumping the exception message in most recent release. maybe that helps to spot the issue at hand

bnomei commented 9 months ago

@afbora did the recent changes help you to get a better debug message?

afbora commented 8 months ago

@bnomei Sorry for the delay. Pixel error is gone but always page view count is 0 and page last visited is 1970-01-01 02:0:0. I tested with both counterImage and counterCss but no luck. Also SQLite database is always empty.

afbora commented 8 months ago

Maybe this is about my local setup or windows?

bnomei commented 8 months ago

i have both versions before and after recent fix running on servers in production without issues. since servers are rarly windows based i dont really want to spend time to debug this.

nilshoerrmann commented 3 months ago

Just for your information: I've just got the same error using MAMP.