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

Adding a new choice to a poll attempts (and fails) to submit the entire post #2529

Closed
TheEssem opened this issue Dec 20, 2023 · 0 comments · Fixed by #2530
Closed

Adding a new choice to a poll attempts (and fails) to submit the entire post #2529

TheEssem opened this issue Dec 20, 2023 · 0 comments · Fixed by #2530
Labels

Comments

@TheEssem
Copy link

Steps to reproduce the problem

  1. Add a poll to a new post on the web frontend's composer box
  2. Select the "Add a choice" button

Expected behaviour

A choice is added to the poll.

Actual behaviour

If there's already text in the post, a "this page could not be displayed correctly" error is thrown. If there isn't, the page just refreshes.

Detailed description

In both of the cases above, it does appear to add a choice to the poll before either refreshing or throwing an error. Using a debugger seems to show that the HTMLFormElement submit event is fired after clicking the button.

Mastodon instance

wetdry.world

Mastodon version

v4.3.0-alpha.0+chuckya

Browser name and version

Vivaldi 6.5.3206.39

Operating system

EndeavourOS Linux

Technical details

Here is the error log when adding a poll choice to a non-empty post on a development instance:

Error: [@formatjs/intl] An `id` must be provided to format a message. You can either:
1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)
or [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR
2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)
to autofix this issue


Error: [@formatjs/intl] An `id` must be provided to format a message. You can either:
1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)
or [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR
2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)
to autofix this issue
    at invariant (webpack-internal:///./node_modules/@formatjs/ecma402-abstract/lib/utils.js:87:15)
    at formatMessage (webpack-internal:///./node_modules/@formatjs/intl/lib/src/message.js:38:81)
    at formatMessage (webpack-internal:///./node_modules/react-intl/lib/src/components/provider.js:55:79)
    at Publisher.render (webpack-internal:///./app/javascript/flavours/glitch/features/compose/components/publisher.jsx:134:84)
    at finishClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19747:31)
    at updateClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19693:24)
    at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:21606:16)
    at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:27421:14)
    at performUnitOfWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26555:12)
    at workLoopSync (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26461:5)


invariant (webpack-internal:///./node_modules/@formatjs/ecma402-abstract/lib/utils.js:87:15)
formatMessage (webpack-internal:///./node_modules/@formatjs/intl/lib/src/message.js:38:81)
formatMessage (webpack-internal:///./node_modules/react-intl/lib/src/components/provider.js:55:79)
Publisher.render (webpack-internal:///./app/javascript/flavours/glitch/features/compose/components/publisher.jsx:134:84)
finishClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19747:31)
updateClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19693:24)
beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:21606:16)
beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:27421:14)
performUnitOfWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26555:12)
workLoopSync (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26461:5)

It appears that a change in 3d3fa75 may have caused this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant