• Resolved Kyle Bondo

    (@leafbreeze)


    Greetings,

    I have Job Manager Version 0.7.24 working just fine. Then I upgraded to WP 4.3, and suddenly this message appeared on my Job Manager main Careers page:

    Notice: Trying to get property of non-object in [root]/wp-content/plugins/job-manager/frontend-shortcodes.php on line 90

    No other pages connected to the Job Manager have this notice. None of my Job pages have it, my Application Form page does not have it, just the page that displays the job openings.

    Any ideas on what has changed or an easy fix to this?

    Cheers!

    https://www.ads-software.com/plugins/job-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Kyle Bondo

    (@leafbreeze)

    Still having this issue — anyone having this problem to after the update?

    Thread Starter Kyle Bondo

    (@leafbreeze)

    It seems the problem is here:

    function jobman_add_app_field_shortcodes( $array ) {

    foreach ( (array) $array as $shortcode ) {

    $conditional = ‘if_’ . $shortcode;

    $label = $shortcode . ‘_label’;

    $cond_label = ‘if_’ . $shortcode . ‘_label’;

    $mandatory = $shortcode . ‘_mandatory’;

    $cond_mandatory = ‘if_’ . $shortcode . ‘_mandatory’;

    add_shortcode( $shortcode, ‘jobman_app_field_shortcode’ );

    add_shortcode( $conditional, ‘jobman_app_field_shortcode_conditional’ );

    add_shortcode( $label, ‘jobman_app_field_shortcode’ );

    add_shortcode( $cond_label, ‘jobman_app_field_shortcode_conditional’ );

    add_shortcode( $mandatory, ‘jobman_app_field_shortcode’ );

    add_shortcode( $cond_mandatory, ‘jobman_app_field_shortcode_conditional’ );

    }

    }

    Thread Starter Kyle Bondo

    (@leafbreeze)

    After going through the Job Template line-by-line, I figured it out.
    Before my upgrade, I had this as my template:

    <table class="job-table">
    <tr>
    <th scope="row" width="20%">Title</th>
    <th scope="row" width="15%">Location</th>
    <th scope="row" width="50%">Description</th>
    <th scope="row" width="15%">Link</th>
    </tr>
    [job_loop]
    <div class="job[job_row_number] job[job_id] [job_odd_even]">
    <tr>
    <td width="20%"><strong>[job_link][job_title][/job_link]</strong></td>
    <td width="15%">[job_field4]</td>
    <td width="50%">[job_field7]</td>
    <td width="15%">[job_link]Position Details[/job_link]</td>
    </tr>
    </div>
    [/job_loop]
    </table>

    In the DIV tag, you can see the “job[job_id]” listed. I think this was a way to get the table to show odd/even behavior based on the JOB_ID number. However, this is the new line:

    <div class="job[job_row_number] [job_odd_even]">

    By removing the JOB_ID out of my DIV, the PHP NOTICE goes away. Not sure why, but it works. If you place JOB_ID anywhere else in the template, you get the ID. But in the DIV tag, it breaks it.

    Hope that helps!

    Plugin Author Thomas Townsend

    (@smb-dev)

    leafbreeze:

    Thanks for haring your fix .

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Upgrade Causing Plugin Notice to Appear’ is closed to new replies.