Reply box not available in a thread

  • Bug
  • Thread starter Wrichik Basu
  • Start date
In summary, this problem is caused by Prism plugin code highlighting and a possible crash of that prevented the reply box JS from running.
  • #1
Wrichik Basu
Science Advisor
Insights Author
Gold Member
2,116
2,691
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
  • #2
Me too (Firefox on Android).

Workaround: click Reply in a post and the edit box appears with the quoted material. You can then edit.
 
  • Like
Likes jack action and Wrichik Basu
  • #3
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.
 
  • #5
I have the same problem with Safari Version 16.0 (17614.1.25.9.10, 17614)
 
  • Like
Likes Wrichik Basu
  • #6
Greg Bernhardt said:
What browser and version?
Firefox 108.0 (64-bit) as well as Chrome 108.0.5359.98.
 
  • #7
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:
  • Like
Likes Wrichik Basu and Ibix
  • #8
Same issue, same poster in this post. Looks like something about how @Darkmisc is posting code is causing those doubled double quotes.
 
  • Like
Likes mfb and Wrichik Basu
  • #9
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.
 
  • Like
  • Informative
Likes Greg Bernhardt, berkeman, Wrichik Basu and 1 other person
  • #10
There is small update to the core software. I'll find a time in the next week to run it.
 
  • Like
Likes mfb and Wrichik Basu

Related to Reply box not available in a thread

1. Why is the reply box not available in a thread?

There could be several reasons for this. One possibility is that the thread has been closed by the forum moderator or administrator. Another possibility is that the thread is old and can no longer accept new replies. It is also possible that you do not have the proper permissions to reply to the thread.

2. How can I enable the reply box in a thread?

If you are the forum moderator or administrator, you can enable the reply box by adjusting the forum settings. If you are a regular user, you can contact the forum moderator or administrator and request that they enable the reply box for the thread.

3. Can I still participate in the discussion if the reply box is not available?

Yes, you can still participate in the discussion by reading the existing replies and clicking on the "like" or "dislike" buttons to express your opinion. You can also start a new thread on the same topic if you would like to initiate a new discussion.

4. Is there a time limit for when the reply box becomes unavailable in a thread?

The time limit for when the reply box becomes unavailable in a thread varies depending on the forum settings. Some forums may have a specific time limit, while others may keep the reply box open indefinitely. You can check the forum rules or contact the forum moderator for more information.

5. Can I still view the replies in a thread if the reply box is not available?

Yes, you can still view the replies in a thread even if the reply box is not available. The replies will be visible to anyone who has access to the thread. However, you will not be able to add your own reply unless the reply box is enabled.

Similar threads

  • Feedback and Announcements
Replies
9
Views
1K
  • Feedback and Announcements
Replies
13
Views
3K
  • Feedback and Announcements
Replies
7
Views
326
  • Feedback and Announcements
Replies
2
Views
612
  • Feedback and Announcements
2
Replies
46
Views
8K
  • Feedback and Announcements
Replies
1
Views
449
  • Feedback and Announcements
Replies
3
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
1K
  • Feedback and Announcements
Replies
21
Views
2K
Back
Top