Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webui: rename files... cannot be opened more than once time #21614

Closed
lictex opened this issue Oct 15, 2024 · 3 comments · Fixed by #21620
Closed

webui: rename files... cannot be opened more than once time #21614

lictex opened this issue Oct 15, 2024 · 3 comments · Fixed by #21620
Labels
Confirmed bug An issue confirmed by project team to be considered as a bug WebUI WebUI-related issues/changes

Comments

@lictex
Copy link

lictex commented Oct 15, 2024

qBittorrent & operating system versions

qBittorrent: 5.0.0 aarch64
Operating system: opensuse tumbleweed 20241007
Qt: 6.6.3
libtorrent-rasterbar: 1.2.19

What is the problem?

rename files... cannot be opened more than once

Steps to reproduce

  1. open webui
  2. right click a torrent and select rename files...
  3. renaming window opens normally. close it
  4. right click a torrent and select rename files...
  5. renaming window opens with a blank file list
    image
    and it won t work again until a page refresh

Additional context

55bff4f replaces some top level var in <script/> with const/let
while var can be redeclared and const/let can not

Log(s) & preferences file(s)

Uncaught SyntaxError: Identifier 'TriState' has already been declared
    at r.exec (MooTools-Core-1.6.0-compat-compressed.js:5:14921)
    at Object.success (MooTools-Core-1.6.0-compat-compressed.js:7:28140)
    at r.extend.$owner (MooTools-Core-1.6.0-compat-compressed.js:5:18121)
    at Object.onStateChange (MooTools-Core-1.6.0-compat-compressed.js:7:23489)
    at r.extend.$owner (MooTools-Core-1.6.0-compat-compressed.js:5:18121)
    at XMLHttpRequest.<anonymous> (MooTools-Core-1.6.0-compat-compressed.js:5:10940)
@lictex lictex changed the title webui: rename files... cannot be opened more than once webui: rename files... cannot be opened more than once time Oct 15, 2024
@xavier2k6 xavier2k6 added the WebUI WebUI-related issues/changes label Oct 15, 2024
@thalieht thalieht added the Confirmed bug An issue confirmed by project team to be considered as a bug label Oct 15, 2024
Chocobo1 added a commit to Chocobo1/qBittorrent that referenced this issue Oct 15, 2024
Added an IIFE around the whole script to suppress variable redeclaration errors.

Closes qbittorrent#21614.
Chocobo1 added a commit to Chocobo1/qBittorrent that referenced this issue Oct 15, 2024
Added an IIFE around the whole script to suppress variable redeclaration errors.

Closes qbittorrent#21614.
Chocobo1 added a commit to Chocobo1/qBittorrent that referenced this issue Oct 15, 2024
Added an IIFE around the whole script to suppress variable redeclaration errors.

Closes qbittorrent#21614.
@Chocobo1
Copy link
Member

Do you mind help verify #21620, #21621 would fix the dialog?

@lictex
Copy link
Author

lictex commented Oct 18, 2024

tested both pr and the dialog itself does seems work properly 🎉


but when i click the select all combobox on the header, then reopen the dialog,
i still get another error and a blank file list..

Uncaught TypeError: Cannot read properties of undefined (reading 'name')
    at dynamicTable.js?locale=C&v=3yxlaw:2179:28
    at Array.sort (<anonymous>)
    at Object._sortNodesByColumn (dynamicTable.js?locale=C&v=3yxlaw:2177:19)
    at r.extend.$owner (MooTools-Core-1.6.0-compat-compressed.js:5:18121)
    at dynamicTable.js?locale=C&v=3yxlaw:2194:26
    at Array.forEach (<anonymous>)
    at Function.forEach (MooTools-Core-1.6.0-compat-compressed.js:5:2711)
    at Array.each (MooTools-Core-1.6.0-compat-compressed.js:5:4561)
    at Object._sortNodesByColumn (dynamicTable.js?locale=C&v=3yxlaw:2192:19)
    at r.extend.$owner (MooTools-Core-1.6.0-compat-compressed.js:5:18121)

edit: found that it also happens without this pr (and even cannot recover after page refreshes) so it must be another issue..

@Chocobo1
Copy link
Member

found that it also happens without this pr (and even cannot recover after page refreshes) so it must be another issue..

@lictex
Feel free to file another issue so we can fix it.

Chocobo1 added a commit that referenced this issue Oct 20, 2024
Added an IIFE around the whole script to suppress variable redeclaration errors.

Closes #21614.
Original PR #21620.
PR #21621.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed bug An issue confirmed by project team to be considered as a bug WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants