All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

deleting empty category group throws low search error

Francesco Pensabene 19 Feb 2014 11:24 question, complete

cannot delete **empty** category group - get this error:

Fatal error: Call to a member function get() on a non-object in /Users/xxxxxx/Sites/xxxxxx.it/xxxxxx.me/system/expressionengine/third_party/low_search/ext.low_search.php on line 194

Replies

  1. Low 19 Feb 2014 11:29

    Ah.

    Open up ext.low_search.php and go to line #190. Add a new line there, moving existing code down, then add this line:

    if (empty($cat_ids)) return;


    That should fix it.

  2. Francesco Pensabene 19 Feb 2014 12:07

    Ok this works the cat groups gets deleted but still getting those:
    -----------------------------------------------------------------

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined variable: cat_ids

    Filename: models/category_model.php

    Line Number: 367

    -----------------------------------------------------------------

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /Users/xxxxxxxx/Sites/xxx.it/xxxx-test.me/system/codeigniter/system/core/Exceptions.php:170)

    Filename: libraries/Functions.php

    Line Number: 809

    -----------------------------------------------------------------

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /Users/xxxxxxx/Sites/xxxxx.it/xxx-test.me/system/codeigniter/system/core/Exceptions.php:170)

    Filename: libraries/Functions.php

    Line Number: 414

    bye!
    Francesco

  3. Low 19 Feb 2014 13:26

    That's actually an EE bug.

    Open system/expressionengine/models/category_model.php and look up line #348 which is empty. Add this to that line:

    $cat_ids = NULL;


    Which should fix it. I'll notify EllisLab, too.

  4. Francesco Pensabene 19 Feb 2014 13:30

    Yup! it works!
    Thankyou very much!

    bye
    Francesco