unraid-plugin-docker.folder
unraid-plugin-docker.folder copied to clipboard
Blank options on 6.10 rc3
As the title states, the options area is empty as reported on the unraid forums.

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.
@darki73 @GuildDarts are you still planning on continuing this plugin? A quick update would be much appreciated.
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.
I am guessing this project is dead?
@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.
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 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:
- Opening
/usr/local/emhttp/plugins/docker.folder/DockerFolder_Docker.page - Going to line 229 - 232

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.

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:

So as you can see, the initialization script is triggered way before document is ready for use.
Totally broke the entire script. all the folders disappeared and it went back to default look (no "folders")
@darki73 can confirm this is also the same issue in the stable 6.10
Confirm same blank page on 6.10.0 ,can some one to fix it ?
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.