Projects tigase _server tigase-http-api Issues #139
Uncaught TypeError: generateButton is null in new Dashboard (#139)
Wojciech Kapcia (Tigase) opened 1 year ago
Uncaught TypeError: generateButton is null
    generateQrCode https://xmpp.xmr8.net:8443/dashboard/users:826
    onclick https://xmpp.xmr8.net:8443/dashboard/users:1

The problem is in function generateQrCode (tigase/dashboard/users/index.jte:172) which does:

let escapedJid = jid.replace("@","-").replace(".","-");
let modalBody = document.querySelector("#generateAuthToken-" + escapedJid + " div.modal-body");
let generateButton = document.querySelector("#generateAuthToken-" + escapedJid + " div.modal-footer a[type='submit']");

But it fails for JIDs with domains with more than 2 parts. .replaceAll() function should be used instead of just .replace().


I think it's worth reviewing other functions as well

  • Andrzej Wójcik (Tigase) commented 1 year ago

    Fix was applied in commit 10aeaa4a.

    I've reviewed other functions but other usages of replace were in Java and replaced all occurrences of the string.

  • Andrzej Wójcik (Tigase) changed state to 'In Progress' 1 year ago
    Previous Value Current Value
    Open
    In Progress
  • Andrzej Wójcik (Tigase) changed state to 'In QA' 1 year ago
    Previous Value Current Value
    In Progress
    In QA
  • Wojciech Kapcia (Tigase) changed state to 'Closed' 1 year ago
    Previous Value Current Value
    In QA
    Closed
  • Wojciech Kapcia (Tigase) commented 1 year ago

    works, ty.

  • Wojciech Kapcia (Tigase) added to iteration "tigase-server-8.4.0" 11 months ago
  • Wojciech Kapcia (Tigase) changed fields 11 months ago
    Name Previous Value Current Value
    Version
    empty
    tigase-server-8.4.0
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.4.0
Target Release
1.0
Sprints
n/a
Customer
n/a
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/tigase-http-api#139
Please wait...
Page is in error, reload to recover