• Resolved GabrielStream

    (@gabrielstream)


    Hi there !

    I need some help as I’m trying to remove all company fields and change some job fields. I added this code to the functions.php :

    add_filter( ‘submit_job_form_fields’, ‘custom_submit_job_form_fields’ );
    function custom_submit_job_form_fields( $fields ) {
    $fields[‘job’][‘job_location’][‘label’] = “Lieu de la mission”;
    $fields[‘job’][‘job_location’][‘description’] = “Laissez en blanc si le lieu importe peu”;
    $fields[‘job’][‘job_location’][‘placeholder’] = “p.ex. Paris”;
    $fields[‘job’][‘job_type’][‘label’] = “Type de mission”;
    $fields[‘job’][‘job_category’][‘label’] = “Region”;
    $fields[‘job’][‘application’][‘required’] = “false”;
    $fields[‘job’][‘application’][‘required’] = “false”;
    unset( $fields[‘company’]);
    return $fields;
    }
    And then theirs an error message from WP :

    “Warning: include(/homepages/43/d543071460/htdocs/wp-content/plugins/wp-job-manager-locations//templates/form-fields/-field.php): failed to open stream: No such file or directory in /homepages/43/d543071460/htdocs/wp-content/plugins/wp-job-manager/wp-job-manager-template.php on line 26

    Warning: include(): Failed opening ‘/homepages/43/d543071460/htdocs/wp-content/plugins/wp-job-manager-locations//templates/form-fields/-field.php’ for inclusion (include_path=’.:/usr/lib/php5.4′) in /homepages/43/d543071460/htdocs/wp-content/plugins/wp-job-manager/wp-job-manager-template.php on line 26″

    :/ What can I do ?

    https://wordpress.org/plugins/wp-job-manager/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sounds like you haven’t completely uploaded the plugin.

    I would re-download WP Job Manager and upload it to your WordPress install as a fresh install.

    Hope this helps!

    Kind Regards,
    Scott

    Thread Starter GabrielStream

    (@gabrielstream)

    Just re-downloaded wp job manager and re-installed it but it’s still not working …

    Plugin Author Mike Jolley

    (@mikejolley)

    Remove this line, it doesn’t exist:

    $fields['job']['job_type']['label'] = "Type de mission";
    Thread Starter GabrielStream

    (@gabrielstream)

    On submit_job_form we’ve got that :

    ‘job_type’ => array(
    ‘label’ => __( ‘Job type’, ‘wp-job-manager’ ),
    ‘type’ => ‘term-select’,
    ‘required’ => true,
    ‘placeholder’ => ”,
    ‘priority’ => 3,
    ‘default’ => ‘full-time’,
    ‘taxonomy’ => ‘job_listing_type’
    ),

    So on the filter the line
    $fields[‘job’][‘job_type’][‘label’] = “Type de mission”;
    is to change ”Job type” to ”Type de mission”.

    And that works just fine. But I tried what you suggested Mike and even after deleting this line, I still got the error message :-/

    Plugin Author Mike Jolley

    (@mikejolley)

    Maybe its $fields[‘job’][‘job_category’][‘label’] = “Region”; then.

    One of the rules you’re adding is creating a new field. A field without a type, hence the error.

    Thread Starter GabrielStream

    (@gabrielstream)

    Just tried adding just that to functions.php :
    add_filter( ‘submit_job_form_fields’, ‘custom_submit_job_form_fields’ );

    function custom_submit_job_form_fields( $fields ) {
    unset( $fields[‘company’]);
    return $fields;
    }

    And still got the same error message … Just can’t figure it out …

    Apologize for the confusion earlier and Mike is correct.

    This won’t happen on a clean install or if you unset an entire field like that.

    I’m assuming it’s either caching related as to why you still see the error with the latest test or you have done something else somewhere.

    If you look at what would cause the issue it’s adding a field that doesn’t have a type like Mike suggested:

    https://github.com/mikejolley/WP-Job-Manager/blob/b5285d4cfb6088e2ee72a3f7676289fd2ee799c2/templates/job-submit.php#L26

    If you still see this on a clean install I can recommend a clean install and then adding fields 1 by 1 until you pinpoint which one you’ve added that doesn’t have a type thus throwing the warning / error here.

    Hope this helps!

    Kind Regards,
    Scott

    Plugin Author Mike Jolley

    (@mikejolley)

    Do you maybe have any other form-modification code, a form field editor plugin running, or even a theme which modifies fields?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Company fields’ is closed to new replies.