Bug 393700 - File type editor doesn't respect set order after pressing Apply
Summary: File type editor doesn't respect set order after pressing Apply
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_filetypes (other bugs)
Version First Reported In: 5.25.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 493738 497391 500369 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-30 20:41 UTC by Piotr Mierzwinski
Modified: 2025-04-27 16:58 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Videocast of Firefox insisting on opening xml files (429.28 KB, video/x-matroska)
2022-09-27 14:18 UTC, tomashnyk
Details
The preferred program resets on plaintext, but not other file types (1.33 MB, video/webm)
2025-02-24 18:25 UTC, Yannis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2018-04-30 20:41:12 UTC
As in subject. When I change the order of applications and press Apply there are forced some entries on specified positions. Below please find steps to reproduce:

For example I would like to change applications order showing after click on ui file.

1. RMB on file mydialog.ui and open Properties
2. Press button "File Type Options" (it shows File type editor)
3. Change order in "Application Preference Order" like this:
   KUIViewer
   Qt Designer
   Qt Creator 
   KWrite
   Kate
   Diffuse Merge Tool
   and others
4. Press Apply button

Actual result:
The order have been changed like this:
   KUIViewer
   KWrite
   Qt Creator
   Kate
   Qt Designer
   Diffuse Merge Tool

Expected result:
The order of applications should not be changed.
If some applications are necessary to be here then let them be put on end of list and should not break the order set by user.
Comment 1 tomashnyk 2022-09-27 14:18:14 UTC
Created attachment 152458 [details]
Videocast of Firefox insisting on opening xml files

I can quite easilly confirm this on Kubuntu 22.04 (with backports, so Plasma 5.25). It does not reliably get triggered for each association, but I managed to get it for mime type "text/x-c++src" and also for xml - Firefox is especially persistent (see the video).

It can be workaround by removing the applications that are misbehaving - but they get added anyway, so that only works for changing the default application, not their order on further places.
Comment 2 tomashnyk 2022-09-27 14:24:25 UTC
There used to be this bug: https://bugs.kde.org/show_bug.cgi?id=291177 but I am not sure if it and the solution to it is in any way relevant.
Comment 3 John Kizer 2024-12-23 05:57:23 UTC
*** Bug 493738 has been marked as a duplicate of this bug. ***
Comment 4 John Kizer 2024-12-23 05:57:34 UTC
*** Bug 497391 has been marked as a duplicate of this bug. ***
Comment 5 John Kizer 2024-12-23 06:04:19 UTC
Added two more recent bugs as duplicates to this, as they all described inconsistent but incorrect applying of the Application Preference Order in the File Type Editor.

It might be worth noting here, I could not personally reproduce the bug when the preference order was among a small (<=5) number of applications - the video examples that folks have attached appear to show longer lists being affected, so perhaps there's something triggered when there is a larger number of entries there?
Comment 6 george fb 2025-01-26 06:37:50 UTC
I looked into this a little and found some things:
 - the settings are saved correctly in `mimeapps.list`
 - only happens when I change qtcreator, other apps are kate, kwrite, firefox, vivaldi and zed (org.kde.kate.desktop; org.kde.kwrite.desktop; org.mozilla.firefox.desktop; vivaldi-stable.desktop; org.qt-project.qtcreator.desktop; dev.zed.Zed.desktop;)
 - there's a conflict with the `text/plain` entry in the config file, if I remove the `text/plain` entry it works as expected

I tested with the `text/html` mime type.
Comment 7 Yannis 2025-02-24 18:25:28 UTC
Created attachment 178833 [details]
The preferred program resets on plaintext, but not other file types
Comment 8 Yannis 2025-02-24 18:30:06 UTC
I have confirmed the bug on version 6.3.0. It is definitely happening on plain text but not every file type.

One suggestion for this specific bug:
The product might be better listed as systemsettings and the component as kcm_filetypes, but I don't seem to have the ability to do this on this ticket.
Comment 9 John Kizer 2025-02-28 20:20:40 UTC
*** Bug 500369 has been marked as a duplicate of this bug. ***