"Recipient" field is required

Hey,

I think I’ve found a possible bug in the Messages extension - if it’s not a bug, is it possible to fix with a snippet?

I was testing my site with a friend, and while logged into my Admin account, and they were logged into their regular user account (no membership assigned or listings created) - I viewed their front-end profile and tried to send them a message, but after clicking send it bounced back with the error:

''recipient" field is required.

To reproduce:

Log in as Admin
Visit WP backend > Users
Click ‘View’ on a regular member
From their profile page, try send a message to them.
Error should appear.

Cheers,
Chris :victory_hand:

Hi,

Thanks for the details. We tested everything in more detail and were unable to reproduce this issue. Please make sure that there are no restrictions from Memberships in the plan settings, and that the Restrict messages to buyers feature is not enabled in HivePress > Settings > Orders. Also, please clarify in what context this error appears, for example, when sending a message to a regular user via their page, or the message button in the user block in the sidebar, etc.

Hi,

Thanks for your reply. I just double checked my Memberships plans and have nothing related to restricting Messages. Nor, do I have the HivePress > Settings > Orders option available to me, as I’m not using the Bookings, Marketplace or Requests extensions.

To reproduce the error:
I log in to my Admin account,
Via the backend I select ‘Users’,
Click ‘View’ on a regular user,
I visit the regular user’s profile page,
Click on the ‘Send Message’ button in the left sidebar,
The modal window to enter the message opens,
I enter any message,
Click ‘Send’,
Error appears with “recipient” field is required.

The HivePress plugins and version numbers I’m using can be seen here:

Hopefully this helps?

Cheers,
Chris :victory_hand:

Hi,

I see. Please send temporary WP access to support@hivepress.io with details for reproducing this issue, and we’ll check it (please send only the link, without login and password). You can create a temporary access link using this plugin Temporary Login Without Password – WordPress plugin | WordPress.org.

Thanks for reporting this issue, the bug is confirmed. It occurs only if either Marketplace or Requests are not installed. As a temporary fix, please change this line in the Messages extension hivepress-messages/includes/blocks/class-message-send-form.php at master · hivepress/hivepress-messages · GitHub to:

} else {

We’ll also fix this in the next Messages update.

1 Like

Many thanks for taking the time to look into this. I’ve purposely built my site to be as simple as possible, hence, using less extensions. Thank you for the quick fix, and glad to hear it’ll be pushed out soon! :folded_hands:

Cheers,
Chris :victory_hand:

1 Like

Just adding I finally had a chance to test this and the fix seems to be working. Thanks again! :slight_smile: