WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
Event filtering not working (19 posts)

  1. thorwik
    Member
    Posted 2 years ago #

    Hello,
    At least since version 4.16, perhaps even longer, the admin-side event filtering has not worked for us. You can view future events just fine, but every time you try to filter for Past events or All events, all it shows is a blank page. The recent updates have not fixed this issue, we are currently using version 4.212.

    Is anyone else having this problem and do you think it could be fixed? I'll gladly provide any additional information you might need.

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 2 years ago #

    can you post any PHP or JS error?

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    have you tried disabling other plugins or your theme?

    also worth making sure you're on a recent WP version too (< wp 3.1 has an issue with search)

  4. thorwik
    Member
    Posted 2 years ago #

    Unfortunately there are no JavaScript errors and I don't have access to the PHP logs. I've tried disabling other plugins without luck. We are running WordPress version 3.2.1.

  5. jazbek
    Member
    Posted 2 years ago #

    Thorwik, try temporarily setting the WP_DEBUG option to true in your wp-config.php. It'll cause the php errors to output to your page.

  6. thorwik
    Member
    Posted 2 years ago #

    Thanks for the tip. Even with debug mode enabled there are no errors displayed, just the blank page. The left side menus and website title loads normally, but other than that there's nothing there.

  7. jazbek
    Member
    Posted 2 years ago #

    If the side menus and title load normally, then the page is not blank. :) That makes a big difference.

    Do you get the "no events" message?

  8. thorwik
    Member
    Posted 2 years ago #

    Nope, no "no events" message.

  9. agelonwl
    Member
    Posted 2 years ago #

    is it possible to post your website url with php debug mode is on?

  10. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    did you try testing this on the 2011 theme?

  11. thorwik
    Member
    Posted 2 years ago #

    I would have to open up a mirror site for test use then. The site is live and I can't shut it down to the public without a very good reason. Do the active site theme really effect how the plugin administrator tools work / look?

  12. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    yes, bad themes can break any plugin (even admin-side). on a vanilla install it definitely works so you need to figure out what changes you made to wp to break EM.

    neat trick, go to Appearances and click 'preview', then navigate to the events page in that popup window in 2011 mode to see if it works. no theme changing necessary!

  13. thorwik
    Member
    Posted 2 years ago #

    There's no problem on the actual events page. It's just the admin-tool and you can't access that through the theme.

  14. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    i repeat - bad themes can break any plugin (even admin-side).

    without trying that, you can't be sure. event filtering definitely works.

  15. jazbek
    Member
    Posted 2 years ago #

    Strangely enough, I ran into this same problem today when we moved to a new server. It wasn't happening only on past events, but when we showed future events (we have almost 9000).

    No php error was being displayed in the logs or with WP_DEBUG turned on. After a lot of debugging, it turned out the script was running out of memory.

    thorwik: EDIT: I will post the fix I came up with and put a link to it here sometime tomorrow.

    Marcus, we've had out of memory errors on all the listing pages because they pull all of the events from the database, when only 20 need to be shown on the page. I've had to rewrite both the admin listing function and all the events listings pages, to pass limit and offset to $args to get the events, and then remove those to get EM_Events::count(), which works much better. Any chance of this being refactored into a future release? I've searched around and noticed I'm not the only one who's been running into out of memory issues with the plugin. :)

  16. thorwik
    Member
    Posted 2 years ago #

    Thanks for the report jazbek, I'm happy to hear the cause of this has been discovered. We have been using Events Manager for a long time and there are thousands of past events by now. It's a good reminder to me as a developer too, to always add the sorting and filtering functions to the database queries and not just the UI.

  17. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    send it over and let me check. am not planning on making major changes to the current codeset as the move to posts will bypass the need for it, but if it's easy to change no problem!

  18. jazbek
    Member
    Posted 2 years ago #

    Ok guys, here is my fix for the memory issue in the admin area:

    http://pastebin.com/QHjWGLuD

    thorwik: if you put that into your theme's functions.php, hopefully that'll fix your issue.

    Marcus, there are only 4 small changes between this and the em_admin_events_page() function that comes with the plugin. The changes are on lines 27, 36-38 137, and 219.

    Note that this only fixes the memory issue in the admin area, to fix it on all the other event lists, I've used template overrides to change the $args that are passed to EM_Events::get() and the loops that output the data.

    Please let me know if I can clarify anything. :)

  19. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    yes, could you supply an svn-style patch to what needs editing on the EM files? The above seems to be an add-on rather than changes to the EM code.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic