thirtybees / beesblog

Blog module for thirty bees
Academic Free License v3.0
1 stars 12 forks source link

Cannot add new category in Bees blog module #53

Closed Hedgehog85 closed 2 years ago

Hedgehog85 commented 5 years ago

Whenever I try to add a new category in blog module, I got 500 error. Server logs show the following error:

[Fri Jan 04 06:41:22.389934 2019] [:error] [pid 106490] [client ip:46291] PHP Notice: Uninitialized string offset: 5 in /var/www/www-root/data/www/domain.com/modules/beesblog/controllers/admin/AdminBeesBlogCategoryController.php on line 378, referer: http://domain.com/admin###/index.php?controller=AdminBeesBlogCategory&addbees_blog_category&token=c004163d7e98cfad041ebe500041765f [Fri Jan 04 06:41:22.390009 2019] [:error] [pid 106490] [client ip:46291] PHP Fatal error: Cannot access empty property in /var/www/www-root/data/www/domain.com/classes/ObjectModel.php on line 306, referer: http://domain.com/admin###/index.php?controller=AdminBeesBlogCategory&addbees_blog_category&token=c004163d7e98cfad041ebe500041765f

getdatakick commented 5 years ago

@Hedgehog85 have you modified the module in any way?

Because I just can't comprehend how it's possible to get these error messages.

The first notice complains about this line. The $name variable simply can't have string value 5, as it iterates over keys from known array.

The second error is just a continuation of this first problem.

On related note: this whole switch code block is quite unnecessary since fields don't have other field type than TYPE_STRING

Hedgehog85 commented 5 years ago

No, i haven't modified it, just installed straight from admin panel. Also tried to reinstall the module, but the problem is still there. Also, for some reason module works ok on the different website (hosted on the same vps)