unraid-plugin-docker.folder icon indicating copy to clipboard operation
unraid-plugin-docker.folder copied to clipboard

Blank options on 6.10 rc3

Open SavageAUS opened this issue 3 years ago • 11 comments

As the title states, the options area is empty as reported on the unraid forums. 17F403FA-496F-4BAA-90B0-38FFAA8BDDD4

SavageAUS avatar Mar 13 '22 08:03 SavageAUS

This looks like some sort of race condition in the DOM. Setting a breakpoint on this line:

let dropdownElement = $(#dropdown-${id}).clone(true)

You will find that the dropdownElement length is equal to 0 -- meaning that it can't find that particular element. I verified that the id that is being passed is the container id which is correct. After the page loads, you can open up developer tools and run:

var id = "a44765f3cd56"; let dropdownElement = $(#dropdown-${id}).clone(true)

Where id is equal to the container id you would like to check. You will see that jquery was able to find the element now, but wasn't quite ready when the code wants to execute.

I'll wait and see if the developer is working on this issue. If I have time, I'll take another look for a fix.

GitCuppaJoe avatar Mar 18 '22 21:03 GitCuppaJoe

@darki73 @GuildDarts are you still planning on continuing this plugin? A quick update would be much appreciated.

hendrik1120 avatar Apr 06 '22 10:04 hendrik1120

Just for additional context, it is still having an issue on Version: 6.10.0-rc4 where the context menus don't show up. It also means you can't easily click the icon for the web gui since that doesn't display. Would be great if it was updated.

Jmete avatar Apr 17 '22 13:04 Jmete

I am guessing this project is dead?

SavageAUS avatar Apr 23 '22 07:04 SavageAUS

@hendrik1120 I am not an original developer of this project, just submitted a small patch when faced the issue I had.

As of right now, I cant even test this out, as I am still running 6.9.2, and don't have a spare server to test out 6.10.

Maybe once it is released, @GuildDarts will take a look at it, most plugins are developed and updated right after the new version is released, they are rarely available for the release candidates versions.

darki73 avatar May 01 '22 14:05 darki73

Im running 6.10.rc5 and i pulled @SavageAUS SavageAUS version and extracted the only changed file (DockerFolder_Docker.page) I could find in his 2022-03-19 version and I'm still seeing the issue. @darki73 can you link your patch for me to test?

A supposed fix for the log button not responding was posted to the UnRaid forum, i will test tonight and run a diff on all the files.

AzAel76 avatar May 01 '22 23:05 AzAel76

@AzAel76 I was talking about the patch submitted about a year ago, regarding the settings issue, I've yet to see what causing problem with the pop-up on the 6.10.

PS. THIS IS NOT A FIX (as I cannot test it), but by the looks of it, if it is a race condition, you might try:

  1. Opening /usr/local/emhttp/plugins/docker.folder/DockerFolder_Docker.page
  2. Going to line 229 - 232 image

Replace:

(function() {
    userprefs_fix_apply('docker')
})();

With:

$(document).ready(function() {
    userprefs_fix_apply('docker');
});

I have no idea if it will work, but you might aswell try 😋

And here is a bit more info on why the issue MIGHT occur: As you can see from this code snippet, we have 3 console logs, one in the JQuery realization of "is document loaded", second one in the "native js", and third in the current function which calls for (I suppose) init script for the page. image

So from here, we would assume, that the latter one will be called last, however, if we will look at the browser console, there will be this stuff: image

So as you can see, the initialization script is triggered way before document is ready for use.

darki73 avatar May 03 '22 10:05 darki73

Totally broke the entire script. all the folders disappeared and it went back to default look (no "folders")

AzAel76 avatar May 04 '22 00:05 AzAel76

@darki73 can confirm this is also the same issue in the stable 6.10

Goldmaster avatar May 19 '22 11:05 Goldmaster

Confirm same blank page on 6.10.0 ,can some one to fix it ?

masterwishx avatar May 19 '22 17:05 masterwishx

I spent few hours debugging this with no luck (I am more of a backend developer, not frontend), the starting point should be https://github.com/GuildDarts/unraid-plugin-docker.folder/issues/11#issuecomment-1072792061

An easy way to make it work which might help others: Open the folder so that you have access to individual containers and start or stop a container from there. The drop down items will work until the page is refreshed.

thecode avatar May 20 '22 18:05 thecode