Rich Text Editor for Job Description Shows “Required” Error on First Submit

After enabling the WYSIWYG (rich text) editor for the “Job Description” field on the listing submission form using the editor => true setting, the field throws a “Job Description is required” error when the form is submitted even if content is entered. Submitting the second time works correctly.

add_filter(
  'hivepress/v1/models/listing',
  function( $model ) {
    $model['fields']['description']['editor'] = true;
    return $model;
  },
  1000
);

Steps to reproduce
My website

  1. Go to the “Post a Job” page.
  2. Fill in all required fields, including Job Description.
  3. Click “Submit Listing.”
  4. Observe validation error on Job Description.
  5. Click “Submit Listing” again, the listing is submitted successfully.

Expected result
The form should recognize the Job Description field as filled on the first submission and submit without showing an error.

Hi,

Thanks for the request and details. Please note that we have not tested this plugin and cannot provide further details. Also, we cannot guarantee 100% compatibility with third-party plugins, so some of them may require custom integration.

As a workaround, we recommend using this plugin: Classic Editor – WordPress plugin | WordPress.org

I hope it helps

Thanks for your reply.

The plugin you’re referring to doesn’t make any difference in this case. Is there anything else you could recommend trying?

@andrii - I believe @goteachabroad is experiencing the old bug that meant that whilst enabling the rich text editor feature on the description field, I think it broke the JS validation and requires the page being submitted twice to actually work.

I thought this was fixed in a previous update, but the field @goteachabroad mentions seems to be having the same bug.

I hope that makes sense. (There’s old topics on this issue regarding the description box, too)

Issue when trying to add a new listing with the rich text enabled description

Cheers,
Chris :victory_hand:

1 Like

Thanks for reporting this issue, we plan to fix this in the next HivePress update. It occurs because the form is refreshed via AJAX when the category is selected, and it seems to break the JS script of the editor.

Thanks, I can see it has been added to roadmap for the next 6 months. Thank you for that.