Projects tigase _server tigase-http-api Issues #139
Uncaught TypeError: generateButton is null in new Dashboard (#139)
Closed
wojciech.kapcia@tigase.net opened 4 months 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 4 months 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' 4 months ago
Previous Value Current Value
Open
In Progress
Andrzej Wójcik (Tigase) changed state to 'In QA' 4 months ago
Previous Value Current Value
In Progress
In QA
wojciech.kapcia@tigase.net changed state to 'Closed' 4 months ago
Previous Value Current Value
In QA
Closed
wojciech.kapcia@tigase.net commented 4 months ago

works, ty.

wojciech.kapcia@tigase.net added to iteration "tigase-server-8.4.0" 3 months ago
wojciech.kapcia@tigase.net changed fields 3 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