Skip to content

Missing icon cache is too aggressive #2713

Description

When a container is created and it doesn't have an icon, it will default to the question mark. However, if a valid image is defined later, even when the container is recreated and you hard refresh in browser, it's still the question mark.

If you look at DockerClient.php:

if (empty($tmp['icon'])) $tmp['icon'] = '/plugins/dynamix.docker.manager/images/question.png';

So then it gets persisted into state/plugins/dynamix.docker.manager/docker.json permanently unless manually changed. I think the code that exists for this case where it's missing the icon so it uses the fallback but then it gets a valid icon so then it changes to the correct icon is faulty;

$iconExists = !empty($tmp['icon'])
&& (is_file($tmp['icon']) || is_file($docroot . $tmp['icon']));

Because this will always evaluate as true since the placeholder image does exist, the check for a proper icon never runs again. The only solution is to manually edit the icon field in docker.json.

Might be related to #2691?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions