[FIXED] Custom column shows wrong icons in 26.50

Things you’d like to miss in the future...
Forum rules
When reporting a bug, please include the following information: your XYplorer version (e.g., v27.90.0047), your Windows version (e.g., Win 11), and your screen scaling percentage (e.g., 125%). We recommend adding your Windows version and screen scaling percentage to your profile or signature. This will make debugging much easier for us.
Post Reply
DeeLight
Posts: 33
Joined: 19 Mar 2013 00:21

[FIXED] Custom column shows wrong icons in 26.50

Post 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 1017 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 1017 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, "|");
Last edited by DeeLight on 27 Oct 2024 05:22, edited 1 time in total.

admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Custom column shows wrong icons in 26.50

Post by admin »

If you set the Format to Text, do you see a valid icon file name?

DeeLight
Posts: 33
Joined: 19 Mar 2013 00:21

Re: Custom column shows wrong icons in 26.50

Post 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 1002 times

highend
Posts: 14566
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom column shows wrong icons in 26.50

Post 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
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Custom column shows wrong icons in 26.50

Post by admin »

Same here, works fine.

DeeLight
Posts: 33
Joined: 19 Mar 2013 00:21

Re: Custom column shows wrong icons in 26.50

Post 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 :|

DeeLight
Posts: 33
Joined: 19 Mar 2013 00:21

Re: Custom column shows wrong icons in 26.50

Post 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...

admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Custom column shows wrong icons in 26.50

Post 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.

Post Reply