save-in icon indicating copy to clipboard operation
save-in copied to clipboard

Invalid options are not validated when imported

Open tombones opened this issue 7 years ago • 4 comments

Unfortunately, I haven't been able to save any images using this extension since I updated to the latest version. At first I thought it might be a symlink issue, but it doesn't even let me save directly to the download folder.

The only setting I changed since updating was "Prompt when a duplicate filename is encountered". Strangely, this is labeled "Chrome" and I no longer appear to be able to change the setting (it was formerly set to "rename" I think). Not sure if this is related, but I thought it was worth mentioning.

Please let me know if you need any other info to help troubleshoot.

tombones avatar Sep 14 '18 16:09 tombones

It appears the "when a duplicate filename is encountered" setting was indeed the culprit.

  • I tried removing and reinstalling Save In from Firefox. This alone didn't fix the issue.
  • I then went into the Save In settings, and found that the "when a duplicate filename is encountered" option was no longer grayed out, and I was able to change the option back to "Uniquify".
  • I tested again and found that images saved correctly.
  • I went back to the Save In settings (having kept the tab open) and changed the option back to "Prompt"
  • I tested again and found that images would no longer save
  • I switched back to "Uniquify" and closed the Save In settings tab. I confirmed that images were saving properly again.
  • When I reopened the Save In settings, "when a duplicate filename is encountered" option was now grayed out.

TL;DR: It appears the "when a duplicate filename is encountered (Chrome)" option becomes temporarily accessible the first time you open the settings page after installing or updating the extension in Firefox. If you change that option from the default (Uniquify) to "Prompt", the addon will no longer save files. You can fix this by removing the addon from Firefox and re-installing it, then immediately opening the settings page and changing the "when a duplicate filename is encountered (Chrome)" option back to "Uniquify".

tombones avatar Sep 14 '18 16:09 tombones

Thanks for the through report. The time spent must have been quite frustrating. I'll see if I can add some validation to settings, since this can happen with imported settings too.

gyng avatar Sep 16 '18 06:09 gyng

Thankfully the first thing I thought to try fixed it, so it wasn't too bad. Is there any way to enable that option in Firefox Quantum (at least the "prompt" setting), or is it completely unsupported right now?

tombones avatar Sep 16 '18 16:09 tombones

Yeah, that's right. "prompt" is unsupported in Firefox.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads/FilenameConflictAction

gyng avatar Sep 17 '18 05:09 gyng