RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.67k stars 10.66k forks source link

Attempting to save Livechat Appearance fails #33407

Open billynoah opened 1 month ago

billynoah commented 1 month ago

Description:

Attempting to save Livechat Appearance fails with an error.

Steps to reproduce:

  1. Go to Omnichannel > Livechat Appearance (/omnichannel/appearance)
  2. Update anything on the form and click Save

Expected behavior:

Form saves

Actual behavior:

I get an error:

must have required property 'value' [invalid-params]

Server Setup Information:

Client Setup Information

Relevant logs:

Here is the POST request and response:

Endpoint: https://chat.example.com/api/v1/livechat/appearance Request:

[
  {
    "_id": "Livechat_conversation_finished_message",
    "value": ""
  },
  {
    "_id": "Livechat_conversation_finished_text",
    "value": ""
  },
  {
    "_id": "Livechat_display_offline_form",
    "value": false
  },
  {
    "_id": "Livechat_email_field_registration_form",
    "value": true
  },
  {
    "_id": "Livechat_enable_message_character_limit",
    "value": false
  },
  {
    "_id": "Livechat_message_character_limit",
    "value": 0
  },
  {
    "_id": "Livechat_name_field_registration_form",
    "value": true
  },
  {
    "_id": "Livechat_offline_email",
    "value": "sales@corvettedepot.ca"
  },
  {
    "_id": "Livechat_offline_form_unavailable",
    "value": "We are not live right now, but leave us a message and we will get back to you as soon as we can."
  },
  {
    "_id": "Livechat_offline_message",
    "value": ""
  },
  {
    "_id": "Livechat_offline_success_message",
    "value": "Thank you."
  },
  {
    "_id": "Livechat_offline_title",
    "value": "Leave a message"
  },
  {
    "_id": "Livechat_offline_title_color",
    "value": "#666666"
  },
  {
    "_id": "Livechat_registration_form",
    "value": true
  },
  {
    "_id": "Livechat_registration_form_message",
    "value": "Hey! Great to see you. We’re happy to help, but first, please let us know the following:"
  },
  {
    "_id": "Livechat_show_agent_email",
    "value": false
  },
  {
    "_id": "Livechat_show_agent_info",
    "value": false
  },
  {
    "_id": "Livechat_title",
    "value": "MAG.Chat"
  },
  {
    "_id": "Livechat_title_color",
    "value": "#C1272D"
  },
  {
    "_id": "Livechat_hide_watermark"
  },
  {
    "_id": "Livechat_background"
  },
  {
    "_id": "Livechat_widget_position"
  },
  {
    "_id": "Livechat_hide_system_messages"
  }
]

Response:

{
  "success": false,
  "error": "must have required property 'value' [invalid-params]",
  "errorType": "invalid-params"
}
reetp commented 1 month ago

Hi ;-)

Have you got a Starter edition to test on?

I just tried on one of mine & couldn't replicate it so wondered if it was a CE issue?

If you can advise I'll push it to the team.

billynoah commented 1 month ago

@reetp - Sorry, I do not have any other edition to test on. However, on further inspection I think it's pretty plain what's happening here, and yes I believe it is a CE issue.

Consider this screenshot: Screenshot 2024-10-01 at 7 53 18 AM

All four of these fields are disabled. These are the same four fields in my request posted above which are missing the "value" property.

I went in the console and manually enabled all these settings and the form was able to save successfully. Unfortunately, it appears the devs have broken the ability to save the form by trying to entice CE users to go premium with out of reach features. Not very enticing!

reetp commented 1 month ago

Thanks.

Referred to the team.