cwrc / CWRC-WriterBase

The base class from which to create a CWRC-Writer XML editor.
GNU General Public License v2.0
14 stars 3 forks source link

Saving from a template to a new document in a new repository does not work. #10

Closed ilovan closed 6 years ago

ilovan commented 6 years ago

Following error prevents saving: capture

jchartrand commented 6 years ago

Which template did you use?

On Nov 14, 2017, at 3:16 PM, Mihaela Ilovan notifications@github.com wrote:

Following error prevents saving: https://user-images.githubusercontent.com/6600070/32802647-f66c4904-c93d-11e7-8aa3-32e5f12ad70e.PNG — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cwrc/CWRC-WriterBase/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhZXRnScFBH2H6jCoJcZAw1znHrSOtyks5s2fUngaJpZM4Qd7lF.

jchartrand commented 6 years ago

Could you also describe what you did before the error? I’m using the standard russell letter template, which is saving fine.

On Nov 15, 2017, at 11:53 AM, James Chartrand jc.chartrand@gmail.com wrote:

Which template did you use?

On Nov 14, 2017, at 3:16 PM, Mihaela Ilovan <notifications@github.com mailto:notifications@github.com> wrote:

Following error prevents saving: https://user-images.githubusercontent.com/6600070/32802647-f66c4904-c93d-11e7-8aa3-32e5f12ad70e.PNG — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cwrc/CWRC-WriterBase/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhZXRnScFBH2H6jCoJcZAw1znHrSOtyks5s2fUngaJpZM4Qd7lF.

ilovan commented 6 years ago

Letter TEI template.

I added a few entities. Note: I tried to save it twice, and each time the new repo was created, but saving the document failed.

ilovan commented 6 years ago

I got an "Error saving" message.

jchartrand commented 6 years ago

Can you describe specific steps, e.g., highlighted John, clicked person, chose first result from VIAF (John Smith), saved with name: yyyy and description: yyyy. And point me at the resulting repo?

On Nov 15, 2017, at 4:27 PM, Mihaela Ilovan notifications@github.com wrote:

Letter TEI template.

I added a few entities. Note: I tried to save it twice, and each time the new repo was created, but saving the document failed.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cwrc/CWRC-WriterBase/issues/10#issuecomment-344733831, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhZXQ6jVUxFBBjnV3FnTmF1xdWF7yhTks5s21cmgaJpZM4Qd7lF.

ilovan commented 6 years ago
  1. Opened the template.
  2. Selected Brynjulf Bull with my cursor
  3. Hit "Tag Person"
  4. Selected the VIAF entity
  5. Hit "Save" on the attribute form
  6. Selected "hotel"
  7. Clicked "Tag link"
  8. Added link in the attribute panel (http://www.grand.no/en/default.html)
  9. Hit "save" in the attribute panel
  10. Hit "Save" on the ribbon
  11. Got a popup stating: This document isn't yet associated with a GitHub repository.
  12. Hit "Save on new repository"
  13. Got the form to save the new repository:
  14. Filled in the "Document Name field"
  15. Hit "Create"
  16. Got the "Saving document" progress bar.
  17. Got the "Error saving" message. 18 Checked and the repository was created while the document was not listed in it.

I will email you the document as described above, saved from the edit source window. (I can't upload it to the issue) Also, I repeated this process three times and have 3 empty CWRC-enabled repositories now.

jchartrand commented 6 years ago

I tried those steps just now, but it again saved fine.

Could you point me at the empty repos it created for you?

And just to be sure, did you use the ‘sample_letter.xml' template, rather than the ‘letter.xml' template (as they are named in the CWRC Templates tab of the load file dialog in the CWRC-Writer? Or did you load the template some other way?

Can you possibly also copy/paste any stack traces that might appear in the Chrome developer window, expanding them out wherever possible?

On Nov 15, 2017, at 5:09 PM, Mihaela Ilovan notifications@github.com wrote:

Opened the template. Selected Brynjulf Bull with my cursor Hit "Tag Person" Selected the VIAF entity Hit "Save" on the attribute form Selected "hotel" Clicked "Tag link" Added link in the attribute panel (http://www.grand.no/en/default.html http://www.grand.no/en/default.html) Hit "save" in the attribute panel Hit "Save" on the ribbon Got a popup stating: This document isn't yet associated with a GitHub repository. Hit "Save on new repository" Got the form to save the new repository: Filled in the "Document Name field" Hit "Create" Got the "Saving document" progress bar. Got the "Error saving" message. 18 Checked and the repository was created while the document was not listed in it. I will email you the document as described above, saved from the edit source window. (I can't upload it to the issue) Also, I repeated this process three times and have 3 empty CWRC-enabled repositories now.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cwrc/CWRC-WriterBase/issues/10#issuecomment-344745292, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhZXb_5NCMaTy27mxDAhKkbmFIozJ7uks5s22ESgaJpZM4Qd7lF.

ilovan commented 6 years ago

Addendum: I had been using Firefox, not Chrome - I'm sorry.

Empty repos created:

I did use the sample, not the template. Loaded from the GitWriter dialog.

Repeated the steps outlined above for the fourth time with browser developer tools on Chrome . Repository created with both document xml and annotations json. (see https://github.com/ilovan/CWRC-Writer-Tests-3)

Repeated the steps outlined above for the fifth time with browser developer tools on Firefox. Got the same results. The only error message in the web console was: XML Parsing Error: syntax error Location: http://208.75.74.217/# Line Number 1, Column 1: view-source:http://208.75.74.217/# Apparently it took exception with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Everything before and after that checked OK in the console.

Cleared my cache in Firefox and tried again - same result.

ilovan commented 6 years ago

If you want - we can do a Skype call for this to try to debug if what I included above if not sufficient. Let me know if you think that would be of any help.

ilovan commented 6 years ago

Tested also on Mac in Firefox - same issue (same error message in the dev console) It looks like it's a browser-specific bug.

jchartrand commented 6 years ago

I can’t reproduce in Firefox on Mac. Just to be sure - you’ve fully cleared your cache?

As you suggest, a screen share over Skype would probably be good.

But, also the error you sent me had an option to click to show the source. Could you sent me that expanded source? Really anything you can expand and send me.

How did you know the problem was with the HTML doctype declaration? i.e., where you say 'Apparently it took exception with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>'

On Nov 16, 2017, at 1:37 AM, Mihaela Ilovan notifications@github.com wrote:

Tested also on Mac in Firefox - same issue (same error message in the dev console) It looks like it's a browser-specific bug.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cwrc/CWRC-WriterBase/issues/10#issuecomment-344830019, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhZXbzB3Ph3AuUMfNY5G4PWSx3vLQh_ks5s29gbgaJpZM4Qd7lF.

ilovan commented 6 years ago

This is crazy! Cleared all my cache again, browsing history, cookies, etc. since the beginning of time. Still get the same result.

Available to skype in anytime. I'm on cwrc_project (just ping me on Skype when you can)

jchartrand commented 6 years ago

Hi Mihaela,

I pinged you on Skype earlier, but cwrc_project still shows ‘away'.

I have continued to look at the problem, and found that I get the same error you specified, but it happens when the initial cwrc-writer page is loaded, not when I try to save. That error with the doctype is a problem with the index.html page, and doesn’t, I don’t think affect the save. Here is what I see:

Anyhow, suspecting network connectivity might be causing the other error with saving (are you on a slow or spotty connection?), I found a place with a very slow connection, and now I also get an error, maybe the one you are talking about.

What do you see happening in the Network tab of the developer tools if you narrow to XHR? Do you see something like this:

Or, in the console, do you see this:

Send me anything you see at all, even if it doesn’t seem related. And again, are you on a slow connection - can you do a speedtest?

I’ll work on the problem I’ve found, but let's confirm that it is the same problem you have.

On Nov 17, 2017, at 10:42 AM, Mihaela Ilovan notifications@github.com wrote:

This is crazy! Cleared all my cache again, browsing history, cookies, etc. since the beginning of time. Still get the same result.

Available to skype in anytime. I'm on cwrc_project (just ping me on Skype when you can)

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cwrc/CWRC-WriterBase/issues/10#issuecomment-345278566, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhZXZQ4Snqj9_HnlebItJ_nqLfaR5dIks5s3alkgaJpZM4Qd7lF.

ilovan commented 6 years ago

Tried three other new repo saves last night, no rdf annotations, just changed the text of the salutation (for the sample letter) or the heading (tei poem) to the current date and time (look for Nov 28) Same error, same message. Still Firefox.

jchartrand commented 6 years ago

I've fixed a problem with the save that happened when using a name for the repository that contained spaces (or other characters like colon). I'm guessing this is the problem you had, and that it was just a coincidence that you used repository names with spaces while in Firefox, and not in other browsers. Anyhow, let me know if it works for you now.

ilovan commented 6 years ago

IT WORKS!!!

First I was a bit sceptical about this being the fix, since I saved https://github.com/ilovan/CWRC-Writer-Tests-3 as "CWRC-Writer Tests 3", in Chrome, and it worked just fine. I tested a few repos this morning in Firefox and it actually did work. Great detective work @jchartrand .