Page 1 of 1

[FIXED] Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 20:14
by DeeLight
After upgrading to 26.50, the displayed icons in my custom column are incorrect:
26.40:
2024-10-25 13_56_43-XYplorer @ XYplorer.ini - 26.40.0400.png
2024-10-25 13_56_43-XYplorer @ XYplorer.ini - 26.40.0400.png (24.61 KiB) Viewed 1078 times
26.50:
2024-10-25 13_57_58-XYplorer @ XYplorer.ini - 26.50.0200.png
2024-10-25 13_57_58-XYplorer @ XYplorer.ini - 26.50.0200.png (23.38 KiB) Viewed 1078 times
Custom Column Info:
  Caption: Complete?
     Type: Script
   Script: load "load\Complete.xys", "Complete"
   Format: Icon
  Trigger: List
Item type: Folder


Complete.xys:
"Complete"
    $patterns = "COMPLETE.ok|COMPLETE.~ok|INCOMPLETE.bad|INCOMPLETE.warn|.info|.warn";
    $keys = "complete|complete_for_now|incomplete_bad|incomplete_warn|info|warning";
    $icons  = "Fugue\tick.ico|Custom\todo.ico|Fugue\cross.ico|Fugue\exclamation-diamond.ico|Fugue\information-octagon.ico|Fugue\exclamation-button.ico";

    explode($patternList[], $patterns);
    explode($keyList[], $keys);
    explode($iconList[], $icons);

    $allResults = listfolder(<cc_item>, $patterns, 1);

    $icons = "";

    foreach($keyList as $key => $value) {
        $pattern = $patternList[$key];
        $icon = $iconList[$key];

        $result = strpos($allResults, $pattern) != -1 ? TRUE : FALSE;

        if ($value == "warning" && strpos($allResults, "INCOMPLETE.warn") != -1) {
            $result = "";
        }

        if ($result) {
            $icons .= "|" . $icon;
        }
    }

    return trim($icons, "|");

Re: Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 20:38
by admin
If you set the Format to Text, do you see a valid icon file name?

Re: Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 20:45
by DeeLight
Yes:
2024-10-25 14_43_21-XYplorer @ XYplorer.ini - 26.50.0200.png
2024-10-25 14_43_21-XYplorer @ XYplorer.ini - 26.50.0200.png (29.9 KiB) Viewed 1063 times

Re: Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 20:53
by highend
Can't reproduce with a simplified script...

Complete.xys

Code: Select all

"Complete"
    return "Bitwarden.ico";
Works fine with 26.40 and after upgrading that instance to 26.50 it still displays that icon fine.
If I exchange it to a different .ico and refresh the column: Still fine

Re: Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 21:00
by admin
Same here, works fine.

Re: Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 21:09
by DeeLight
After more testing, it seem to be once again caused by the Custom Icons feature (like a previous issue that I had):

If I disable Custom Icons completely, the custom columns display the correct icons once again.

Last time, I was able to find the 2 custom icon definitions that caused the weird behavior/bug when moving folders.

Gonna start digging to see if I can find it again :|

Re: Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 21:26
by DeeLight
After unckecking:

C:\Users\*\*?*\>D:\Graphics\Icons\Replacement Icons\Windows 11\Gray.ico


Another icon started showing for all icons in the custom column, so I unchecked it as well:

C:\Users\*\>D:\Graphics\Icons\Replacement Icons\Windows 11 Icons\User.ico


After those 2 are unchecked, all icons in the custom column are displayed correctly. I have no idea why those 2 custom icons would affect the custom columns, since the Season 1 to 4 folders from the screenshot are on the U: drive and not C:

I think I can probably find a workaround for those 2 custom icons, but it still seems to me like a bug...

Re: Custom column shows wrong icons in 26.50

Posted: 25 Oct 2024 22:01
by admin
Yes, there is a bug. Your C:\Users\*\*?*\>D:\Graphics\Icons\Replacement Icons\Windows 11\Gray.ico definition should only match folders, not ICO files (even if they are in a custom column for a folder).

PS: fixed in next beta.