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

Duplicate Page command started giving error #1445

Closed
ykurji opened this issue Jul 1, 2024 · 5 comments · Fixed by #1479
Closed

Duplicate Page command started giving error #1445

ykurji opened this issue Jul 1, 2024 · 5 comments · Fixed by #1479
Assignees
Labels
bug Something isn't working released Available in a released installer

Comments

@ykurji
Copy link

ykurji commented Jul 1, 2024

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:

dllhost_2024June30_410

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)

  • OneNote Version: O365, Version 2405 (Build 17628.20144)
  • OneMore Version: Version 6.4.0 with OneNote 16.0.17628.20144
@ykurji ykurji added bug Something isn't working unread I have seen it or had time to refine it yet labels Jul 1, 2024
@ykurji
Copy link
Author

ykurji commented Jul 2, 2024

Restarting the system completely resolved this issue. I'm still not sure why this started happening in the first place.

@stevencohn stevencohn removed the unread I have seen it or had time to refine it yet label Jul 7, 2024
@stevencohn
Copy link
Owner

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.

@stevencohn stevencohn added the need-more-info Need more info from user before proceeding label Jul 10, 2024
@ykurji
Copy link
Author

ykurji commented Jul 14, 2024

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.
Please let me know if I need to provide more info.

Can we handle this scenario to create a dupliicate page where we do not have a title or title field is not visible?

@stevencohn stevencohn removed the need-more-info Need more info from user before proceeding label Jul 14, 2024
stevencohn added a commit that referenced this issue Jul 14, 2024
@stevencohn stevencohn self-assigned this Jul 14, 2024
@stevencohn stevencohn added the next-release Addressed but not yet released label Jul 14, 2024
@stevencohn stevencohn linked a pull request Jul 14, 2024 that will close this issue
@stevencohn
Copy link
Owner

stevencohn commented Jul 14, 2024

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.

weissm pushed a commit to weissm/OneMore that referenced this issue Jul 15, 2024
weissm pushed a commit to weissm/OneMore that referenced this issue Jul 15, 2024
@ykurji
Copy link
Author

ykurji commented Jul 19, 2024

Thank you :)

@stevencohn stevencohn added released Available in a released installer and removed next-release Addressed but not yet released labels Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in a released installer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants