Support » Plugin: WP Job Manager » the link you followed has expired..

  • Resolved tmhharvey

    (@tmhharvey)


    When I try to submit a new job listing, from the preview page, and click on “submit listing” we are now getting a bug that says “The link you followed has expired.” This happens on every version from 132.2+

    I have followed the forum’s suggestions and have added the following code to our child theme’s job-preview.php page (right below the initial <form> tag) however, it is still not working.

    <?php
    /**
    * Fires at the top of the preview job form.
    *
    * @since 1.32.2
    */
    do_action( ‘preview_job_form_start’ );
    ?>

    Any ideas or suggestions would be greatly appreciated!

    • This topic was modified 1 month, 4 weeks ago by  tmhharvey.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Disabling the preview step could be a workaround.
    Have you currently switched to a default theme and does this happen then?

    What theme are you using, and have you updated to the latest version?

    This seems to be a common issue with out-dated themes that do not include the required nonce that is inserted using that preview_job_form_start hook … so in theory adding the hook as you mentioned, should resolve the issue.

    When viewing the preview page, use developer tools in your browser to inspect the source HTML, and see if you can find the nonce field which should have the name set as _wpjm_nonce for a hidden input field (just to confirm it is actually outputting the nonce field)

    Thanks for the comments guys, we are using the Sydney-child theme.

    Inspecting the source HTML, I see a lot of things that have nonce in them but nothing has the exact “_wpjm_nonce” as you have specified.

    Does this mean the code snippet above is in the wrong place or could it be something else is overwriting it?

    Here is a snippet of the form code from the job-preview.php page I changed found in our child theme’s job_manager folder:

    <form method=”post” id=”job_preview” action=”<?php echo esc_url( $form->get_action() ); ?>”>
    <?php
    /**
    * Fires at the top of the preview job form.
    *
    * @since 1.32.2
    */
    do_action( ‘preview_job_form_start’ );
    ?>
    <div class=”job_listing_preview_title”>
    <input type=”submit” name=”continue” id=”job_preview_submit_button” class=”button job-manager-button-submit-listing” value=”<?php echo esc_attr( apply_filters( ‘submit_job_step_preview_submit_text’, __( ‘Submit Listing’, ‘wp-job-manager’ ) ) ); ?>” />
    <input type=”submit” name=”edit_job” class=”button job-manager-button-edit-listing” value=”<?php esc_attr_e( ‘Edit listing’, ‘wp-job-manager’ ); ?>” />
    <h2><?php esc_html_e( ‘Preview’, ‘wp-job-manager’ ); ?></h2>
    </div>
    <div class=”job_listing_preview single_job_listing”>
    <h1><?php wpjm_the_job_title(); ?></h1>

    <?php get_job_manager_template_part( ‘content-single’, ‘job_listing’ ); ?>

    <input type=”hidden” name=”job_id” value=”<?php echo esc_attr( $form->get_job_id() ); ?>” />
    <input type=”hidden” name=”step” value=”<?php echo esc_attr( $form->get_step() ); ?>” />
    <input type=”hidden” name=”job_manager_form” value=”<?php echo esc_attr( $form->get_form_name() ); ?>” />
    </div>
    <?php
    /**
    * Fires at the bottom of the preview job form.
    *
    * @since 1.32.2
    */
    do_action( ‘preview_job_form_end’ );
    ?>
    </form>

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    I think the first step is to make sure that it is indeed this template file that is being used. You can check that by adding an html comment to it, for example, or simply adding a word to the form somewhere, and checking if it’s being used.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    I’m marking this thread as Resolved as it’s been more than a month since the last reply. If you still need help, please do reply again and mark the thread as Unresolved!

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