Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate: clicking on hero card throw 'displayText' of undefined error #2876

Closed
compulim opened this issue Feb 3, 2020 · 2 comments · Fixed by #3120
Closed

Investigate: clicking on hero card throw 'displayText' of undefined error #2876

compulim opened this issue Feb 3, 2020 · 2 comments · Fixed by #3120
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. community-help-wanted This is a good issue for a contributor to take on and submit a solution customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. needs-repro Waiting for repro or investigation

Comments

@compulim
Copy link
Contributor

compulim commented Feb 3, 2020

This one need investigations to see if the hero card payload is valid or not.

Version

4.6.0-es5

Describe the bug

When clicked on the following hero card, it does not invoke the expected submit.

{
  attachments: [
    {
      contentType: "application/vnd.microsoft.card.hero",
      content: { buttons: [{ type: "postBack", title: "LET'S GET STARTED" }] },
      buttons: [{ type: "postBack", title: "LET'S GET STARTED" }]
    }
  ];
}

Then send another hero card,

{
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.hero",
      "content": {
        "buttons": [
          {
            "type": "openUrl",
            "title": "LOG IN",
            "value": "https://login.microsoftonline.com/microsoft.onmicrosoft.com/oauth2/authorize?client_id="
          }
        ]
      }
    }
  ]
}

Click on it will say, 'displayText' of undefined error.

Steps to reproduce

  1. Bot to send the hero card payload as above
  2. Click on the button
  3. Expect postback to the bot, but not happened
  4. Bot to send the second hero card payload
  5. Click on the button

Expected behavior

The first one should send a postBack to the bot.

The second one should not error out.

Additional context

[Bug]

@compulim compulim added bug Indicates an unexpected problem or an unintended behavior. Pending needs-repro Waiting for repro or investigation customer-reported Required for internal Azure reporting. Do not delete. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. and removed Pending labels Feb 3, 2020
@cwhitten cwhitten added the R9 label Mar 9, 2020
@compulim compulim added the community-help-wanted This is a good issue for a contributor to take on and submit a solution label Apr 9, 2020
@compulim
Copy link
Contributor Author

Repro the first case on 4.8.0.

Cannot repro the second case, 'displayText' of undefined error.

@compulim
Copy link
Contributor Author

https://github.com/microsoft/botframework-sdk/blob/master/specs/botframework-activity/botframework-activity.md#post-back did not specify if both text and value are not specified, it should send or not send the post back.

But if we are following the same concept of message back, we should. https://github.com/microsoft/botframework-sdk/blob/master/specs/botframework-activity/botframework-activity.md#message-back.

  • A7358: If text and value are both unspecified, the message SHOULD be sent without content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. community-help-wanted This is a good issue for a contributor to take on and submit a solution customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. needs-repro Waiting for repro or investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants