Addpixel / KirbyComments

[Kirby 2] File-based comments stored as subpages for the Kirby CMS.
MIT License
68 stars 4 forks source link

"Undefined index: comments" #43

Open demlak opened 6 years ago

demlak commented 6 years ago

Hi, since i moved everything to a new server, i get a problem on the comments plugin. it is integrated in the lovely theme lingonberry by S1SYPHOS.

I also installed 1.5.2 now and got the same problem.

maybe it is related to php 7.2? Maybe i just screwed something on my code? and maybe it is lingonberry related? since i'm not a coder, i can't answer this and ask you =)

following error: line 299 in ..site/plugins/comments/plugin/Comments.php "Undefined index: comments"

you can see it on my blog. just test on any of the blog posts: http://0ma.de

thx in advance

florianpircher commented 6 years ago

Are you using any special caching in Kirby?

Note: offering Kirby-debug-information on a public server is very dangerous, you should disable the debug mode on the live system.

demlak commented 6 years ago

ah thx.. i just disabled debug mode now.

as far as i know, i use nothing special over the original lingonberry config on caching. you can see on the linked git-repo.

florianpircher commented 6 years ago

This comments form does not provide a preview mechanism, which Kirby Comments requires for security and anti-spam reasons. I have looked at the default config of the kirby-lingonberry setup and it disables the comments preview using c::set('lingonberry.comments.preview', false). Since Kirby Comments requires a preview, the form fails.

This is an issue in the domain of the kirby-lingonberry system, but in the meantime try setting c::set('lingonberry.comments.preview', true) in your config.php (after include kirby()->roots()->config() . '/lingonberry.php';).

demlak commented 6 years ago

i'm so sorry.

for my surprise i got no problem on a fresh install of lingonberry with comments. also without preview it is working.

i now have to investigate where i broke my main-install. maybe a problem with other plugins i installed.

thx for your help.. and sorry again =(

demlak commented 6 years ago

found it. the comments-plugin seems to have problems when stats-plugin is also installed.

after deleting site/plugins/stats.php, your comments-plugin works also without preview.

there is no problem with stats-plugin activated, on using preview with comments.

florianpircher commented 6 years ago

OK, I will look into the changes that make the kirby-stats incompatible to Kirby Comments. It seams like Kirby Comments works without preview stage, but I can not guarantee any behavior when skipping the preview, because Kirby Comments is developed with a preview stage in mind.

demlak commented 6 years ago

thx a lot! but well.. kirby stats is very old =)

it seems to be only this one file (it's about languages), that makes problems

demlak commented 6 years ago

this fork works: https://github.com/samnabi/kirby-stats