-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Duplicate Page command started giving error #1445
Comments
Restarting the system completely resolved this issue. I'm still not sure why this started happening in the first place. |
Hi. Could you please provide the full title of the page that you're trying to duplicate where this error occurs. It's failing trying to parse the page title so it can generate a new uniquely numbered page title. Thanks. |
Ah, you are correct. I had the page title hidden (Review -> Hide Page title) because I did not need that field in my notes. So, there was no entry in the page title field. When I enabled it, although the field is still empty it created a duplicate page successfully. Can we handle this scenario to create a dupliicate page where we do not have a title or title field is not visible? |
I was able to fix the command so that it will duplicate a page with a hidden title. However, the caveat is that the duplicate page will have a visible title. The OneNote API does not let me delete the title block of a page. |
Thank you :) |
Problem to Solve
The duplicate page command was working fine and has recently started giving error. It create the new page but doesn't duplicate the contents to the new page.
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Not sure about the exact steps to reproduce as it just started happening one day. I am a frequent user of this command. Here is the screenshot of the error:
Here are the relevant error logs:
14|10:22:18.496| System.ArgumentNullException Message: Value cannot be null. Parameter name: input Source: System StackTrace: at System.Text.RegularExpressions.Regex.Match(String input) at System.Text.RegularExpressions.Regex.Match(String input, String pattern) at River.OneMoreAddIn.Commands.DuplicatePageCommand.SetUniquePageTitle(XNamespace ns, XElement section, Page page) at River.OneMoreAddIn.Commands.DuplicatePageCommand.<Execute>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at River.OneMoreAddIn.Commands.DuplicatePageCommand.<Execute>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at River.OneMoreAddIn.CommandFactory.<Run>d__6.MoveNext() TargetSite: [System] System.Text.RegularExpressions.Regex::Match()
Expected Behavior
An exact duplicate page will be created with the contents copied.
Environment (if applicable)
The text was updated successfully, but these errors were encountered: