• Resolved smartmediaas

    (@smartmediaas)


    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.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author YMC

    (@wssoffice21)

    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.
    • This reply was modified 1 year, 4 months ago by YMC.
    Thread Starter smartmediaas

    (@smartmediaas)

    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

    Plugin Author YMC

    (@wssoffice21)

    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.
    • This reply was modified 1 year, 4 months ago by YMC.
    Plugin Author YMC

    (@wssoffice21)

    Also, try changing the filter type to another one, and also disable the Hierarchical Tree of Terms option.

    Thread Starter smartmediaas

    (@smartmediaas)

    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

    (@wssoffice21)

    Thread Starter smartmediaas

    (@smartmediaas)

    Added. Let me know if you need anything from me.

    Plugin Author YMC

    (@wssoffice21)

    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

    (@smartmediaas)

    I tried to delete the affected terms and recreate them. Still the same issue.

    Plugin Author YMC

    (@wssoffice21)

    We will take this issue into consideration and pass it on to our developers for more detailed analysis.

    Thread Starter smartmediaas

    (@smartmediaas)

    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.
    Plugin Author YMC

    (@wssoffice21)

    We hope that you will be able to solve your difficult task. Good luck!

    Thread Starter smartmediaas

    (@smartmediaas)

    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:

    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:

    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

    (@wssoffice21)

    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.

    I too have been facing ‘Parse error’ since begining for my site 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)

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