NodeBB with Redactor: Can't Reply Topic Opened in New Tab


  • On our site at https://community.troikatronix.com we continue to use Redactor with NodeBB 1.17.2

    For a logged in user, if you:

    1. Go to the forum
    2. Click a topic to open it
    3. Hit the blue "Reply" button

    Redactor opens fine and you can type your reply, etc.

    But if you

    1. Go to the forum
    2. Right click a topic and say "open in new tab" – which causes the topic to open in a new tab (obviously)
    3. Hit "Reply"

    There is no response.

    This happens on Safari, Chrome and Firefox.

    In both cases the button;s HREF is something like

    https://community.troikatronix.com/compose?tid=XXXX&title=Post Title

    Why does this work when you go into the topic directly and not work when you open it in a new tab?

    Best Wishes,
    Mark

  • GNU/Linux Admin

    Hi @mark-coniglio -- it looks like you have some bad javascript added in the footer.tpl

    I see this error on cold load:

    Uncaught TypeError: signupButton is null
        prepareFooter https://community.troikatronix.com/topic/7494/keep-actors-values-in-and-out-synced-data-array/8:1922
        EventListener.handleEvent* https://community.troikatronix.com/topic/7494/keep-actors-values-in-and-out-synced-data-array/8:1914
    

    Specifically, these lines added:

    const signupButton = document.querySelector("#logged-out-menu li:nth-child(1) span");
    signupButton.innerHTML = "Register";
    
    const loginButton = document.querySelector("#logged-out-menu li:nth-child(2) span");
    loginButton.innerHTML = "Login to Forum";
    

    signupButton can be undefined if it does not exist in the DOM.

Suggested Topics

| |