Low Search 5.05 EE 3.5. Edit Collection Trying to get property of non-object
EE 3.5.3, Low Search 5.0.5.
When I Edit Collection I see this notice and warning:
Notice
Trying to get property of non-object
user/addons/low_search/mcp.low_search.php, line 1030
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:115)
ee/EllisLab/ExpressionEngine/Boot/boot.common.php, line 529
Replies
Low 5 Mar 2017 08:17
There's nothing on line 1030 in that file for that version that would cause that error.
Did it occur after an update? Or a fresh installation? Can you try and re-upload the add-on files? Also, what PHP version are you using?
Low 5 Mar 2017 08:20
Sorry, was looking at the wrong branch.
Do you have any category groups present in your installation? Or did you delete a category group recently?
simon 5 Mar 2017 08:31
This is an upgrade from v2.11.7 to v3.5.3.
I have lots of category groups, I have not deleted any recently.
Low 5 Mar 2017 08:38
This is most likely caused by a reference to a non-existent category group in the Channel table. Not something I thought I should explicitly check for, as EE should clean up after itself.
Open up mcp.low_search.php and look up line 996, which should read
Above that, add a new line (inside the foreach loop) and add this block:
...which should fix the issue.
simon 5 Mar 2017 08:51
This site has been through a lot of iterations. It's an MSM site, and to move over to EE v3 (without paying a fortune) I had to delete the main site and promote another site - so there was some manual database work.
I did just check and couldn't find a channel using a group that does not exist.
But, anyway, you fixed worked.
thanks.
Geoff 22 Mar 2017 13:41
Just a heads up--I ran into the same exact error. Fresh install of the latest EE and I have ZERO categories. I don't use them. Your fix above worked for me. Might want to permanently add to your plugin (which is great by the way!).
Thanks!