Support » Plugin: WP Job Manager » Clicking on a category within a post does not list other jobs in same category

  • Resolved michaelcallaway

    (@michaelcallaway)



    I just noticed that when I click on a job category (ie general labor) while viewing a single post I receive “The page you are looking for is no longer here, or never existed in the first place (bummer). You can try searching for what you are looking for using the form below. If that still doesn’t provide the results you are looking for, you can always start over from the home page.” The address bar has “https://www.polk.work/jobs/?search_category=85” displayed. I don’t know if it’s related but the “search jobs” function in all jobs is no longer working either. There is no error, it just doesn’t return any results.

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi,

    Did the category links work previously? If so, then maybe go to Settings -> Permalinks and click the Save button on that page. If that doesn’t solve it, let me know!

    michaelcallaway

    (@michaelcallaway)

    The category links have worked previously though I’m not sure when they stopped. I did as you asked but received the same error message. At the bottom of the permalinks page category base is blank, tag base is blank, job base is job, job category base is job-category, and job type base is job-type.

    michaelcallaway

    (@michaelcallaway)

    I think I’ve found the problem. A few months ago I changed my front page to display my jobs instead of it being a separate homepage. That is where the [jobs] shortcode is now. When I click on a category in a single post it is looking for https://www.polk.work/jobs/?search_category=229, which does not work. When I change it to https://www.polk.work/?search_category=229 it works fine. It does not recognize that the old jobs page no longer exists. I have a feeling that’s why the “search jobs” function in all jobs isn’t working either. How do I fix it?

    michaelcallaway

    (@michaelcallaway)

    Nevermind, I found it. A couple of years ago Adam H. helped me add some code to functions.php in my child theme because it wasn’t displaying categories. The code pointed directly to http://www.polk.work/jobs. All I had to do was remove /jobs. That fixed listing jobs in the same category but the search jobs button in all jobs still isn’t working.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    That fixed listing jobs in the same category but the search jobs button in all jobs still isn’t working.

    I’m not sure what you mean by this. Can you give me step-by-step how to reproduce the problem? Note that there *is* no Search button on the form, normally:

    https://github.com/Automattic/WP-Job-Manager/issues/1409

    michaelcallaway

    (@michaelcallaway)

    If you’re in wp-admin>job listing>all jobs the search jobs button is in the upper right corner. If you search by a company name or any keyword it lists no results. It is also generating errors in query monitor.

    Query
    SELECT posts.ID
    FROM wp_posts posts
    INNER JOIN wp_postmeta p1
    ON posts.ID = p1.post_id
    WHERE p1.meta_value LIKE ‘%labor%’
    OR posts.post_title LIKE ‘%labor%’
    OR posts.post_content LIKE ‘%labor%’
    AND posts.post_type = ‘job_listing’

    Caller
    1. WP_Posts_List_Table->prepare_items()
    wp-admin/includes/class-wp-posts-list-table.php:136
    2. wp_edit_posts_query()
    wp-admin/includes/post.php:1100
    3. wp()
    wp-includes/functions.php:964
    4. WP->main()
    wp-includes/class-wp.php:717
    5. WP->query_posts()
    wp-includes/class-wp.php:601
    6. WP_Query->query()
    wp-includes/class-wp-query.php:3230
    7. WP_Query->get_posts()
    wp-includes/class-wp-query.php:1621
    8. WP_Query->parse_query()
    wp-includes/class-wp-query.php:1006
    9. do_action_ref_array(‘parse_query’)
    wp-includes/plugin.php:515

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi Michael,

    I’m unable to reproduce this. Searching by keyword or company name works for me on my test site, and we don’t have any other reports of this, as far as I’m aware. What versions of WordPress and WPJM are you running? Does this happen if you have all other plugins deactivated?

    I have WordPress 5.0.3 and WPJM 1.3.2.0. I have deactivated all other plugins and it still happens. I have changed my theme and it still happens.

    I don’t know if this is worth mentioning, but a few weeks ago I was receiving similar errors when trying to create or edit jobs posts in wp-admin. The Jetpack support team and I went through a lot of troubleshooting (my host was convinced it was them). I ended up finding an article on google that suggested I add a few lines of code to my functions.php file to “bandaid” the problem. When I upgraded to WPJM 1.3.2.0 I was able to remove the added code because my response times were faster, the errors had cleared, and I was no longer dropping the connection to MySQL database when submitting a new job. It seems for some reason WPJM doesn’t play well with my database. I’d be happy to give you access so you can login and see for yourself.

    Hi Richard,

    While troubleshooting a publicize issue with Jetpack I had WPJM deactivated. I decided to try the search function within the admin panel and everything worked fine. As soon as I reactivated WPJM it failed and the errors came back. I did upgrade WPJM to 1.32.1 today.

    michaelcallaway

    (@michaelcallaway)

    Any update? I haven’t heard anything in a while.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi Michael, sorry for the delay. Like I said, I can’t reproduce this, and we have no other reports, so I don’t know how to resolve this. I’d like to get a developer involved at this point, I think. Since you’ve already been in touch with us via email, can you contact us again that way, and we’ll see what steps we take next? Thanks.

    michaelcallaway

    (@michaelcallaway)

    I think you’re asking me to hire a developer and then get back with you?

    Plugin Contributor Richard Archambault

    (@richardmtl)

    No, I want to get one of *our* developers to take a closer look at your site, and that will be easier via email, which is why I ask that you continue the email conversation you’ve had with us, rather than here. Or am I mistaking you for someone else? You *have* contacted us via email already, haven’t you?

    michaelcallaway

    (@michaelcallaway)

    I apologize for the confusion. I’d be happy to continue this via email. I looked up the address I’ve used before and will forward this conversation.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    I will mark this as Resolved, then, since we’re continuing via email. 🙂

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.