Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cancel Edit Action still saves an empty action #147

Closed
2 tasks done
mjthoraval opened this issue Sep 30, 2023 · 5 comments
Closed
2 tasks done

[Bug] Cancel Edit Action still saves an empty action #147

mjthoraval opened this issue Sep 30, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mjthoraval
Copy link

mjthoraval commented Sep 30, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest Zotero and the latest plugin?

  • I have confirmed I'm using the latest Zotero and the latest plugin

Environment

  • OS: Windows 10
  • Zotero Version: 7.0.0-beta.43+5e634f57f (64-bit)
  • Plugin Version: 1.0.0-15

Describe the bug

After I click on the + to create new action, I get the popup window Edit Action.
Then click Cancel. This creates an empty action.
I would expect that pressing Cancel would not create a new empty action in this case.

Debug Output

1696106413478	addons.xpi	WARN	Checking C:\Program Files\Zotero\distribution\extensions for addons

[JavaScript Error: "NS_NOINTERFACE: " {file: "resource://gre/modules/ComponentUtils.jsm" line: 90}]
createInstance@resource://gre/modules/ComponentUtils.jsm:90:36


1696106415018	addons.xpi	WARN	Addon with ID undefined already installed, older version will be disabled

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1710}]

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1710}]

[JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]" {file: "resource://gre/modules/TerminatorTelemetry.jsm" line: 87}]

[JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]" {file: "resource://gre/modules/TerminatorTelemetry.jsm" line: 87}]

[JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]" {file: "resource://gre/modules/TerminatorTelemetry.jsm" line: 87}]

[JavaScript Error: "uncaught exception: undefined"]

[JavaScript Error: "NS_ERROR_NOT_AVAILABLE" {file: "resource://gre/modules/PartitioningExceptionListService.jsm" line: 92}]

[JavaScript Error: "NotFoundError: Could not get children of file(C:\Users\mjthoraval\AppData\Roaming\Zotero\Zotero\Crash Reports\events) because it does not exist" {file: "resource://gre/modules/CrashManager.jsm" line: 682}]
_getUnprocessedEventsFiles/<@resource://gre/modules/CrashManager.jsm:682:12


appName => Zotero, version => 7.0.0-beta.43+5e634f57f, os => Windows 10.0 19045, locale => en-GB, extensions => Actions and Tags for Zotero (1.0.0-15, extension), Open PDF for Zotero (0.0.8, extension, disabled), Zotero PDF Preview (1.0.0-4, extension, disabled), Translate for Zotero (1.1.0-18, extension, disabled), Better Notes for Zotero (1.1.4-25, extension, disabled), Better BibTex for Zotero (6.7.122, extension, disabled), Zutilo Utility for Zotero (3.10.1a1, extension, disabled), Zotero Better Authors (3.6.2, extension, disabled)

(3)(+2308364): Attaching <checkbox> element to extensions.zotero.downloadAssociatedFiles

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.autoRecognizeFiles

(3)(+0000000): Attaching <checkbox> element to extensions.zotero.automaticSnapshots

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.autoRenameFiles

(3)(+0000000): Attaching <checkbox> element to extensions.zotero.autoRenameFiles.linked

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.openReaderInNewWindow

(3)(+0000000): Attaching <menulist> element to extensions.zotero.tabs.title.reader

(3)(+0000000): Attaching <menulist> element to extensions.zotero.reader.ebookFontFamily

(3)(+0000000): Attaching <html:input> element to extensions.zotero.openURL.resolver

(3)(+0000001): Attaching <menulist> element to extensions.zotero.openURL.version

(3)(+0000002): Attaching <checkbox> element to extensions.zotero.automaticTags

(3)(+0000001): Attaching <html:input> element to extensions.zotero.trashAutoEmptyDays

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.groups.copyChildNotes

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.groups.copyChildFileAttachments

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.groups.copyAnnotations

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.groups.copyChildLinks

(3)(+0000000): Attaching <checkbox> element to extensions.zotero.groups.copyTags

(3)(+0000313): Attaching <checkbox> element to extensions.zotero.export.citePaperJournalArticleURL

(3)(+0000001): Attaching <checkbox> element to extensions.zotero.integration.useClassicAddCitationDialog

(3)(+0000001): PluginInstaller: fetching addon info

(3)(+0000000): PluginInstaller: addon info fetched

(3)(+0000001): HTTP GET resource://zotero-winword-integration/version.txt

(3)(+0000000): PluginInstaller: fetching addon info

(3)(+0000001): PluginInstaller: addon info fetched

(3)(+0000000): HTTP GET resource://zotero-libreoffice-integration/version.txt

(3)(+0000001): Refreshing styles list

(3)(+0000005): Columns title width 390

(3)(+0000012): HTTP GET resource://zotero-winword-integration/version.txt succeeded with 200

(3)(+0000001): HTTP GET resource://zotero-libreoffice-integration/version.txt succeeded with 200

(3)(+0000117): Attaching <checkbox> element to extensions.actionsTags.ruleWarningDisabled

(3)(+0000006): Columns name width 104.28571428571429

(3)(+0000000): Columns event width 104.28571428571429

(3)(+0000000): Columns operation width 104.28571428571429

(3)(+0000000): Columns data width 104.28571428571429

(3)(+0000000): Columns shortcut width 104.28571428571429

(3)(+0000001): Columns menu width 104.28571428571429

(3)(+0006371): Creating string pref 'extensions.actionsTags.rules.1696108730336'

(3)(+0000022): [Warning] Creating element title with no namespace specified. Found multiply namespace matches.

(3)(+0000001): {}

(3)(+0000000): [Warning] Creating element style with no namespace specified. Found multiply namespace matches.

(3)(+0000000): {}

(3)(+0000003): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {"0":{},"1":{},"2":{},"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"10":{}}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {"0":{},"1":{},"2":{},"3":{},"4":{}}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): [Warning] Creating element button with no namespace specified. Found multiply namespace matches.

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): [Warning] Creating element button with no namespace specified. Found multiply namespace matches.

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}

(3)(+0000000): {}

(3)(+0000001): {}

(3)(+0000000): {}


### Anything else?

_No response_
@mjthoraval mjthoraval added the bug Something isn't working label Sep 30, 2023
@windingwind
Copy link
Owner

Thanks for the report, but it is designed to be so. Opening the edit window after creating a new action, not clicking save button and then a new action is created.

@mjthoraval
Copy link
Author

mjthoraval commented Oct 2, 2023

The Edit Action window appears just after creating a new action. So I was expecting the Cancel button to simply cancel the last action, which was the creation of this action.
But I understand the logic that the Cancel button only cancels the modifications to an existing action and not the creation of an action.

Maybe I should reformulate the title and tagging of this issue to be a feature request then?
Is it possible to support cancelling the creation of a new action?
Currently, pressing + and then Cancel saves an empty action. If I wanted to do that, the steps I would follow would be pressing + and then Save instead. I am not sure if the thing I am asking has some drawback, or if it removes some functionality?

This is of course a very small point. So please feel free to close the issue if you think that the current behaviour is better.

@windingwind
Copy link
Owner

Sorry for the late reply. Would you prefer not to open an action editor window instantly after creating an action?

@mjthoraval
Copy link
Author

After pressing on +, I prefer opening an action editor window (as it is currently). But then, I expect the following behaviour:

  • Either I am happy with the action I have created, and then I click Save to save the action. In that case, I want to save all the changes I have made into the new action.
  • Or I think it is not good, or I change my mind and I click on Cancel. In that case, I do not want to have any action created. I cancel the creation of an action.

What you are doing now is: create a new action then open the action editor. So an empty action is created even before I have written anything in it.
What I would have expected is: first open the action editor and then create the action only after clicking on Save.
Does that make sense?

@windingwind
Copy link
Owner

Alright. In that case, I may just add a delete button to the action editor window. Otherwise, the cancel button can be confusing because it has different meanings in different situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants