Post Polls button not interactable in very rare occasions #125

Closed
opened 2023-02-19 00:10:33 +00:00 by mummified-corroding-granny · 1 comment

Kindly,

  • problem is: in a post, a pick multiple poll voting button does not result in a vote as expected after clicking it. This only happens when one of the poll options has the same ID as the post ID
  • a small lil bug that is most likely to happen in new/clean rdrama instances (including development) than on existing production websites
  • it is due to an HTML ID collision between the post body and id of the poll button
  • I can't fix this myself because I don't understand the spaghetti and when I try to change something, the spaghetti breaks elsewehre. Specifically:
 ./files/classes/submission.py:313:                                      body += f''' data-nonce="{g.nonce}" data-onclick="poll_vote_{o.exclusive}('{o.id}', '{self.id}', 'post')"
 files/classes/submission.py:317:                                body += f'''><label class="custom-control-label" for="post-{o.id}">{o.body_html}<span class="presult-{self.id}'''

Thanks,
granny

Kindly, * problem is: in a post, a pick multiple poll voting button does not result in a vote as expected after clicking it. This only happens when one of the poll options has the same ID as the post ID * a small lil bug that is most likely to happen in new/clean rdrama instances (including development) than on existing production websites * it is due to an HTML ID collision between the post body and id of the poll button * I can't fix this myself because I don't understand the spaghetti and when I try to change something, the spaghetti breaks elsewehre. Specifically: ``` ./files/classes/submission.py:313: body += f''' data-nonce="{g.nonce}" data-onclick="poll_vote_{o.exclusive}('{o.id}', '{self.id}', 'post')" files/classes/submission.py:317: body += f'''><label class="custom-control-label" for="post-{o.id}">{o.body_html}<span class="presult-{self.id}''' ``` Thanks, granny

fixed in ecb5ddc840

fixed in https://fsdfsd.net/rDrama/rDrama/commit/ecb5ddc840b953f7db5d33ed2237ae2dd7cb149b
Sign in to join this conversation.
There is no content yet.