WordPress.org

Ready to get started?Download WordPress

Forums

Job Manager
Problem with plugin customization (10 posts)

  1. javiore
    Member
    Posted 1 year ago #

    Hello,

    We are currently using Job Manager in a project. However, our initial expectations were exceeded and the website received more than 900 applications for the offered jobs. This caused a problem in the shared hosting because whenever you list or filter the applications available, all of them are first stored in memory, and then they are filtered one by one. So, the limit defined by the config directive memory_limit was not enough and the shared hosting didn't allow us to increase this value.

    For this reason, I applied several changes to the plugin. Everytime you list or filter the applications, they are loaded through several steps using Ajax.

    I created my own function, which is called at the end of job-manager.php:

    if( array_key_exists( 'jobman-ajax-call', $_REQUEST ) )
    jobman_list_applications_ajax();
    ?>

    This function receives the filter parameters, and also an offset value. Next, it launches a query and shows the results (table rows) for maybe 100 or 200 records. This process is called iteratively from jobman_list_applications() until all the applications are processed and thanks to it all the memory issues are solved.

    Everything seemed to be working fine, but I realized that the filtering by job wasn't being applied. The categories are loaded using

    $cats = wp_get_object_terms( $app->ID, 'jobman_category' );

    and then they are compared to the filter value received by URL. However, when I make this call from my own function, it returns an error (Invalid taxonomy).

    I assume that the taxonomies must be loaded at some point, and my call using Ajax is being launched before this. However, I don't have much experience working with WordPress Plugins and after trying dozens different things I've run out of ideas.

    If anyone could shed light about how to fix this, I'd really appreciate it. Thanks to all!

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

  2. javiore
    Member
    Posted 1 year ago #

    Hello again,

    I've found the answer by myself. Just a call to the function add_action and setting the script admin-ajax.php as target of the ajax call did the trick.

    The functionality remains the same but the way I was using Ajax in WordPress was not the right one.

    Thanks for reading me!

  3. webmarketinghub
    Member
    Posted 1 year ago #

    Hi,

    You sound like you know what you are doing! Wonder if you could help me? I can't even get my applications to save or send out notifications, any ideas?

    Thank you so much,
    Donna :)

  4. T Klein
    Member
    Posted 1 year ago #

    Javiore do you mind posting the source code for your solution? This has been a big problem of mine for awhile.

  5. javiore
    Member
    Posted 1 year ago #

    Hi Donna,

    In fact I don't know much about plugins in WordPress, but if you have posted your problem in the forum, just let me know where it is and I'll try to help :)

  6. javiore
    Member
    Posted 1 year ago #

    Hi T Klein,

    Unfortunately, I've applied so many changes to the plugin, that I doubt it would be useful for you. Anyway, if you could tell me exactly what part you need, I can paste here fragments of the code and so you can use them to figure out how to apply them to your problem.

  7. T Klein
    Member
    Posted 1 year ago #

    I am getting the exceeds memory limit on the applications page, on the admin side of things. Its because I have a ton of application and the way the plugin handles querying the applications, it pushes it over the memory limit. I don't really care if filtering works, I just wish I could see a list of the applications, right now I have to completely rely on the emails.

  8. javiore
    Member
    Posted 1 year ago #

    Is it a shared hosting? Have you first tried contacting your hosting provider to increase this limit?

  9. T Klein
    Member
    Posted 1 year ago #

    Yup, it doesn't work though, its the same problem you had. I have no way of telling how much memory its even using in the first place, but i know its an outrageous amount. We have hundreds if not thousands of applications also.

    Technically I'm hosted on a Private VPS on Dreamhost.

    It is this error:

    http://i.imgur.com/Z8WDN.jpg

    but it is definitely using more then 256mb of memory, because I've tried increasing it to 1gb even just to test that theory.

  10. T Klein
    Member
    Posted 1 year ago #

    If you don't mind uploading your plugin I would love to at least try it out, I don't really use a lot of the functionality besides the basic job posting stuff.

    I would really appreciate it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic