Title: Parse error on filtering
Last modified: January 13, 2025

---

# Parse error on filtering

 *  Resolved [smartmediaas](https://wordpress.org/support/users/smartmediaas/)
 * (@smartmediaas)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/)
 * Hi!
 * I’m having trouble with a parse error affecting some of our filters. Every filter
   works fine except for “Boligprosjekter -> Enebolig” and “Boligprosjekter -> Leilighetsbygg.”
   When I select these, the page gets stuck on loading. Upon inspecting the response,
   I see that it’s not correctly formatted as JSON. How can I fix this?
    -  This topic was modified 1 year, 4 months ago by [smartmediaas](https://wordpress.org/support/users/smartmediaas/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparse-error-on-filtering%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/parse-error-on-filtering/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-on-filtering/page/2/?output_format=md)

 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18240698)
 * Hi!
   A very strange issues. You can enable debugging in the plugin settings. It
   is very difficult to say anything now, since some of the terms in the filter 
   work correctly, but only 2 terms do not work.
 * And also provide us with plugin settings (post types + taxonomies + terms)
    -  This reply was modified 1 year, 4 months ago by [YMC](https://wordpress.org/support/users/wssoffice21/).
    -  This reply was modified 1 year, 4 months ago by [YMC](https://wordpress.org/support/users/wssoffice21/).
 *  Thread Starter [smartmediaas](https://wordpress.org/support/users/smartmediaas/)
 * (@smartmediaas)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18240741)
 * I’ve enabled the debugging option now and attached you’ll find the export of 
   the settings here: [https://limewire.com/d/1783bcec-506e-4c95-8bfe-73c69bf3f145#LFXRCzxpO4wplbELrnBj_Y1RQkbmlVeoFYcW2PUukZM](https://limewire.com/d/1783bcec-506e-4c95-8bfe-73c69bf3f145#LFXRCzxpO4wplbELrnBj_Y1RQkbmlVeoFYcW2PUukZM)
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18240795)
 * Can you provide us with access to your site’s admin panel? We need to check your
   plugin settings. Our specialists will, if possible, check all settings and the
   operation of the plugin.
    -  This reply was modified 1 year, 4 months ago by [YMC](https://wordpress.org/support/users/wssoffice21/).
    -  This reply was modified 1 year, 4 months ago by [YMC](https://wordpress.org/support/users/wssoffice21/).
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18240828)
 * Also, try changing the filter type to another one, and also disable the Hierarchical
   Tree of Terms option.
 *  Thread Starter [smartmediaas](https://wordpress.org/support/users/smartmediaas/)
 * (@smartmediaas)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18240880)
 * I tried changing the filter type and unchecked Hierarchical Tree, but no luck.
   I’ll add you to the staging environment which have the same issue. Which email
   should be added?
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18240896)
 * [wss.office21@gmail.com](https://wordpress.org/support/topic/parse-error-on-filtering/wss.office21@gmail.com?output_format=md)
 *  Thread Starter [smartmediaas](https://wordpress.org/support/users/smartmediaas/)
 * (@smartmediaas)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18240935)
 * Added. Let me know if you need anything from me.
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18241004)
 * Very strange behavior. We looked through your settings and did not see anything
   critical. We advise you to recreate new terms and resave them. The fact is that
   the rest of the terms work correctly with the exception of only two: “Boligprosjekter-
   > Enebolig” and “Boligprosjekter -> Leilighetsbygg. If there was a critical error,
   then other terms in the filter would not work either.
 *  Thread Starter [smartmediaas](https://wordpress.org/support/users/smartmediaas/)
 * (@smartmediaas)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18241083)
 * I tried to delete the affected terms and recreate them. Still the same issue.
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18241101)
 * We will take this issue into consideration and pass it on to our developers for
   more detailed analysis.
 *  Thread Starter [smartmediaas](https://wordpress.org/support/users/smartmediaas/)
 * (@smartmediaas)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18241116)
 * If I leave the affected term with only 1 project it seems to be working. Really
   strange.
 * Edit: works with 2. I’ll try to add one by one now.
    -  This reply was modified 1 year, 4 months ago by [smartmediaas](https://wordpress.org/support/users/smartmediaas/).
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18241128)
 * We hope that you will be able to solve your difficult task. Good luck!
 *  Thread Starter [smartmediaas](https://wordpress.org/support/users/smartmediaas/)
 * (@smartmediaas)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18243003)
 * I was able to identify the problem.
 * **File:** ymc-smart-filter/includes/core/frontend/layouts/post/post-layout1.php
 * When I removed apply_filters from this block, it started working.
 * **Code that does not work:**
 *     ```wp-block-code
       if (has_excerpt($post_id)) {    $content = get_the_excerpt($post_id);} else {    $content = apply_filters('the_content', get_the_content($post_id));}
       ```
   
 * **Code that works:**
 *     ```wp-block-code
       if (has_excerpt($post_id)) {    $content = get_the_excerpt($post_id);} else {    $content = get_the_content($post_id);}
       ```
   
 * I’m not entirely sure why this change resolves the issue, but it seems to fix
   the problem for me.
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18243738)
 * The thing is that when updating a plugin, all previously made edits inside the
   plugin core will be overwritten. That is not a good practice. Therefore, all 
   hooks should be redefined in the WordPress theme or child theme.
 *  [spiritualromeo](https://wordpress.org/support/users/spiritualromeo/)
 * (@spiritualromeo)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/#post-18347516)
 * I too have been facing ‘Parse error’ since begining for my site [https://allindialisting.in/](https://allindialisting.in/)
 * Initially when I would loginto wp-admin in new tab but same window, the filter
   would load results, till then it would just keep showing preloader icon. I thought
   may be it was cache plugin, hence deactivated. However still getting parse error.
   When I log into wp-admin or cpanel the page loads results without error. Not 
   sure what is the issue.
 * PS: I am using layout3 and have customized the results to be displayed.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/parse-error-on-filtering/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-on-filtering/page/2/?output_format=md)

The topic ‘Parse error on filtering’ is closed to new replies.

 * ![](https://ps.w.org/ymc-smart-filter/assets/icon-128x128.png?rev=3354891)
 * [YMC Filter](https://wordpress.org/plugins/ymc-smart-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ymc-smart-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ymc-smart-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/ymc-smart-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ymc-smart-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ymc-smart-filter/reviews/)

 * 16 replies
 * 3 participants
 * Last reply from: [YMC](https://wordpress.org/support/users/wssoffice21/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/parse-error-on-filtering/page/2/#post-18347546)
 * Status: resolved