Reply box not available in a thread

  • Context: Bug 
  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
9 replies · 2K views
Messages
2,188
Reaction score
2,694
I am speaking about this thread: https://www.physicsforums.com/threads/recursion-with-a-runnable-in-java.1047991/

This is what I am seeing:

1670582221344.png

Tried from Chrome and Firefox. Same issue. But in other threads, the reply box is working fine.

Does anyone else face the same issue? Mods?
 
Physics news on Phys.org
Me too (Firefox on Android).

Workaround: click Reply in a post and the edit box appears with the quoted material. You can then edit.
 
Reply
  • Like
Likes   Reactions: jack action and Wrichik Basu
Ibix said:
Workaround: click Reply in a post and the edit box appears with the quoted material. You can then edit.
Interesting. Once I have replied, I can see the edit box. If I refresh the page, it's gone again.
 
I have the same problem with Safari Version 16.0 (17614.1.25.9.10, 17614)
 
Reply
  • Like
Likes   Reactions: Wrichik Basu
Brave, I get a couple of JS errors and no reply box.

Uncaught TypeError: Illegal constructor
at code-block-actions.min.js?_v=93ac117a:2:39
at code-block-actions.min.js?_v=93ac117a:4:313

Uncaught DOMException: Failed to execute 'querySelector' on 'Element': '.line-highlight[data-range=""13"]' is not a valid selector.
at n (https://www.physicsforums.com/js/CM...ugins/line-highlight.min.js?_v=93ac117a:1:487)
at https://www.physicsforums.com/js/CM...gins/line-highlight.min.js?_v=93ac117a:1:2719
at NodeList.forEach (<anonymous>)
at https://www.physicsforums.com/js/CM...gins/line-highlight.min.js?_v=93ac117a:1:2700

Prism plugin is code highlighting? Maybe a crash of that prevented the reply box JS from running.

Minimized code to trigger the problem:
[CODE highlight=""13, 25""]foo[/CODE]
I can reproduce the problem by posting this piece of code in other threads. If I replace the double "" by single " it works, so that's the key problem. I fixed it in the linked thread.
 
Last edited:
Reply
  • Like
Likes   Reactions: Wrichik Basu and Ibix
It's coming from the interactive editor:

> Optional. Line numbers you want to highlight. For example, "2, 4-6" will highlight lines 2, 4, 5 and 6.

It wants the user to write e.g. 2,4-6, so it adds quotation marks around the user input. If the user plugs in "2, 4-6" with quotation marks then the post ends up with double quotation marks, which then breaks the execution of the highlighting script. That means the best fix will have two elements:
- check if the user input has quotes already, and remove them before processing the string further to create valid syntax
- catch the invalid input when showing the comment so it doesn't break things

In the meantime: @Darkmisc please don't add " " around the lines you want to highlight.
 
Reply
  • Like
  • Informative
Likes   Reactions: Greg Bernhardt, berkeman, Wrichik Basu and 1 other person