Closed Bug 1576825 Opened 5 years ago Closed 5 years ago

Deletion of applications for incoming attachment not working (TB 68)

Categories

(Thunderbird :: Preferences, defect)

defect
Not set
normal

Tracking

(thunderbird_esr6869+ fixed, thunderbird69 fixed, thunderbird70 fixed)

RESOLVED FIXED
Thunderbird 70.0
Tracking Status
thunderbird_esr68 69+ fixed
thunderbird69 --- fixed
thunderbird70 --- fixed

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

More de-XBL fun:

Panel for applications for incoming attachment shows up empty after startup and deleting not working (TB 68). The panel gets filled after clicking on the columns to sort.

That won't be so easy to fix since its working on trunk with the reworked options page.

TypeError: this._prefsBundle is undefined applications.js:202:7
get typeDescription chrome://messenger/content/preferences/applications.js:202
connectAndAppendToList chrome://messenger/content/preferences/applications.js:132
_rebuildView chrome://messenger/content/preferences/applications.js:1057
sort chrome://messenger/content/preferences/applications.js:1320
onclick about:preferences:1

On deletion:

TypeError: handlerInfo is undefined applications.js:1538:7
onDelete chrome://messenger/content/preferences/applications.js:1538
confirmDelete chrome://messenger/content/preferences/applications.js:1518
oncommand about:preferences:1

BTW, this code moved to https://searchfox.org/comm-central/source/mail/components/preferences/general.js on trunk.

Alice, I suggest you find the startup issue first. After you delete a type, it's hard to add a new one.

Flags: needinfo?(alice0775)

It's actually worse. When sorting by "Action", only part of the list shows up.

Hmm, on a different profile the list comes up OK, but deletion doesn't work.

Blocks: tb68found

What/where is "Panel for applications for incoming attachment"?

Flags: needinfo?(alice0775)

Options, Attachments, Incoming. Similar to what FF used to have or still has.

Attached file handlers.json (bad)

OK, mimetypes.rdf is now handlers.json. Here is one that you can put into your profile and then try the deletion. It might be corrupt though showing the empty list.

Well, I couldn't find anything corrupt in the file. BTW, you can use https://jsonformatter.org/json-pretty-print for formatting.

TB52 with new profile:
Tool > Options > Attachments > Incoming : empty

TB70 with new profile:
Tool > Options > General > File & Attachments : empty

Sure. Use the manifest.json I attached.

Attached file handlers.json (obsolete) —

Reduced version, here the list looks good after a start.

(In reply to Jorg K (GMT+2) from comment #5)

Created attachment 9088366 [details]
handlers.json

OK, mimetypes.rdf is now handlers.json. Here is one that you can put into your profile and then try the deletion. It might be corrupt though showing the empty list.

Good: The list showing up. And able to delete an action.
Bad: The list showing up. And unable to delete an action.

Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=0fb460d27117da21b5ee2bb36d51ab9c321be263&tochange=253562a57fb51b675a5f7eaf163b0a1ee0f06cd8
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a44934afe25e7ac1fcccc5ca63b90406a29fbee2&tochange=895c1242462121fe44f1bcb1aa57b412eaa7a167

Thanks, you don't see "list not showing up" with the first manifest.json I attached?

Well, removing/adding

    "text/rfc822-headers": {
      "action": 4,
      "extensions": [
        "txt"
      ]
    },

makes the difference between working and not working, maybe some others. I have to bisect it.

Comment on attachment 9088366 [details]
handlers.json (bad)

With this one, the list doesn't show for me.

Attachment #9088366 - Attachment description: handlers.json → handlers.json (bad)
Attached file handlers.json (good)

With this one, the list shows. Difference: I removed:

    "text/rfc822-headers": {
      "action": 4,
      "extensions": [
        "txt"
      ]
    },

and

    "application/ics": {
      "action": 2,
      "ask": true,
      "handlers": [
        {
          "name": "notepad++.exe",
          "path": "C:\\Program Files\\Notepad++\\notepad++.exe"
        }
      ],
      "extensions": [
        "ics"
      ]
    },

Weird.

Attachment #9088370 - Attachment is obsolete: true

Looks like this comes from bug 1519650, thanks again, Alice.

Regressed by: 1519650

On trunk it also fails like this:

TypeError: this.mBundle is undefined general.js:2105:7
get typeDescription chrome://messenger/content/preferences/general.js:2105
connectAndAppendToList chrome://messenger/content/preferences/general.js:2035
_rebuildView chrome://messenger/content/preferences/general.js:1393
_delayedPaneLoad chrome://messenger/content/preferences/general.js:254

and when deleting:

TypeError: handlerInfo is undefined general.js:1874:7
onDelete chrome://messenger/content/preferences/general.js:1874
confirmDelete chrome://messenger/content/preferences/general.js:1854
oncommand about:preferences:1

How do the failing operations relate to the contents of the file? Why is some handlers.json file problematic? Are the more bugs here?

Thanks again, Alice.

How do the failing operations relate to the contents of the file? Why is some handlers.json file problematic? Are the more bugs here?

There are two bugs here which I didn't realise at first:

  1. Delete not working. Once regression range.
  2. Some items as listed in comment #16 make the list misbehave. Another regression range. I don't know how common those items are in the wild. My profile is quite old and I have opened many attachments in the last few years.

Looks like bug 1460392. Many thanks again, Alice!! Time to file a new bug for this issue. EDIT: Filed bug 1576950.

Summary: Panel for applications for incoming attachment shows up empty after startup and deleting not working (TB 68) → Deletion of applications for incoming attachment not working (TB 68)

I looked at FX and see that they have removed the deletion of this actions. Maybe we can remove it too. Why would it be needed to remove them? They could be set to "Always Ask" which would be the same as no action.

Hmm, this is to delete the entire row. What's wrong with that for a clean-up? You don't want people to edit the JSON file in the profile.

Why a clean-up? Do many entries make it slower?

For aesthetic reasons. You clicked on a strange attachment and that recoded and action which will stay with your forever in an ever-growing list. I like some clean-up. Shouldn't be too hard to fix the bug since it shows on trunk.

Totally trivial. Some de-XBL somewhere removed .type so we get it as attribute.

Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #9088521 - Flags: review?(acelists)
Comment on attachment 9088521 [details] [diff] [review]
1576825-fix-deletion.patch

Review of attachment 9088521 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, this works for me.
Attachment #9088521 - Flags: review?(acelists) → review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/450cff2d0782
fix deletion of item from incoming attachment list. r=aceman

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 70.0
Comment on attachment 9088521 [details] [diff] [review]
1576825-fix-deletion.patch

Beta patch will need rebasing since the stuff was in applications.js.
Attachment #9088521 - Flags: approval-comm-esr68+
Attachment #9088521 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: