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

Entity template URLs are wrong #19

Closed
ajmacdonald opened this issue Jan 18, 2018 · 14 comments
Closed

Entity template URLs are wrong #19

ajmacdonald opened this issue Jan 18, 2018 · 14 comments
Assignees

Comments

@ajmacdonald
Copy link
Collaborator

The note and citation entity template URLs that are produced here don't point to the right places.
E.g.
https://cwrc-dev-05.srv.ualberta.ca/sites/default/modules/Islandora-CWRC-Writer/build/src/js/schema/tei/xml/note.xml
should be:
https://cwrc-dev-05.srv.ualberta.ca/sites/default/modules/Islandora-CWRC-Writer/build/schema/tei/xml/note.xml

@ajmacdonald
Copy link
Collaborator Author

Will also need to determine if it makes sense to prepend the cwrcRootUrl here

@ilovan
Copy link
Contributor

ilovan commented Jan 23, 2018

@jefferya , could you possibly look at this as soon as possible? Once this is done, we should be able to test the integrated CWRC-Writer in https dev-06, so one step closer to migration :)

@jefferya
Copy link
Collaborator

@ilovan @SusanBrown

Can I get more context - the approach depends the answers to the following contextual questions?

  • Has the CWRC (not CWRC-Writier) interface been updated to allow users to update schema objects (more specifically, the schema mapping id, the note template id, and the citation template id)?

  • Have the note and citation templates been simplified (e.g., for and orlando schema mapping, there are eventNotes, bioNotes, writingNotes)

  • have all the test schemas been deleted from all the servers?

If the answers to the above are no then I'll have to change each schema object via the Fedora backend that's not included in the default list

I can only the the by-hand changes after the code is installed on each server.

@ilovan
Copy link
Contributor

ilovan commented Jan 23, 2018

@jefferya ,

  1. Schema objects are the objects with the schema cModel and their editing permissions are administered by XACML (i.e. we can decide who has access to edit that collection - right now I think it's just the admins). I am not sure what you mean by schema mapping id, the note template id, and the citation template id as schema objects. Can you please clarify?

  2. To my knowledge, no one modified CWRC-Writer mappings for notes and citations in CWRC Writer for a while now, not since 2014 or so - I believe, and not since Michael left - @ajmacdonald , do you remember anything more recent regarding that?

  3. No, we conducted a superficial review of the schema objects on the CWRC beta site, but we have not deleted the test schemas yet.

If this update operation has to be done manually on each schema object, can we prioritize the schema objects that we know are "keepers" and leave the other ones out? Also, if this needs to be done individually for each Fedora schema object, then I would go with modifying the version in dev-06 and beta , and leave out dev-05.

By the default list you mean the ones in this table?
screen shot 2018-01-23 at 12 41 28 pm

@jefferya
Copy link
Collaborator

  1. At present, there is not interface to edit a schema object (this is not related to permissions). This is from a prior discussion that appears to been lost - there are parts of a schema object, the ones mentioned in a previous comment that were added by hand in 2016 because of restrictions imposed by how CWRC-Writer works with schemas (i.e. the reasons behind why a person can't take a custom schema an have it work within CWRC-Writer). I'm assuming there is no way to edit the above properties of schema object? maybe this ticket?. I think the three of us talked about this in Sept.

  2. So there are still the weird mappings to for event notes, writing notes, bio note, entry notes within CWRC-Writer. If so, newly created schema objects will not work with CWRC-Writer as these note mappings will not be automatically be added to the schema object.

  3. Can the test schemes be removed from Beta? this will same time.

Yes, the image contains the default list. These, if they haven't changed, I can delete and automatically reingest. Otherwise, if there is no front-end to edit, I'll have to login directly to Fedora and edit the rels-ext datastreams to update the properties.

@ilovan
Copy link
Contributor

ilovan commented Jan 25, 2018

See cwrc/DEPRECATED-CWRC-Writer#420 (especially from Jeff's comment on Sept 17, 2016 on)

Beta site:

  • integrated CWRC-Writer - old CWRC-Writer (pre NPM);
  • Jeff has modified the solution pack so that when a new schema object is added, the necessary bits to have the note -type annotations working in CWRC-Writer are automatically added to the new schema object;
  • this customization to the schema object creation mechanism within beta.cwrc.ca works with the o old CWRC-Writer, but would have to be modified to accommodate the new (NPM) CWRC Writer
  • this modification would have to be concurrent with integrating the new CWRC-Writer into Beta (if done sooner, notes would no longer work in the old CWRC Writer)
  • also, when integrating the new (NPM) CWRC-Writer into beta, we would have to modify the existing schema objects that we created over time (e.g. the project-specific schemas, such as CEWW, Playwrights, REED) to ensure they work with the new CWRC-Writer

Dev sites (dev-05 and dev-06)

  • to Jeff's knowledge, the solution pack modification already occurred as part of the work done so far to integrate the new CWRC-Writer, so any new schema object created in these environments should have everything in place to allow the mini CWRC-editors to work as expected [note: this has not been test yet, I will do so this afternoon and confirm]
  • there are, however, a number of older custom schema objects (that already have sample/test objects attached to them) that Jeff will need to manually customize to have the note mini-CWRC-Writer pop up as expected.

TO do's (for now):

Mihaela will test new schema objects in the dev environments and will collect the pid's of a few old schemas in the same environments
Jeff will manually modify the schema objects pointed out by Mihaela

@jefferya
Copy link
Collaborator

jefferya commented Jan 25, 2018

@ajmacdonald

I'm assuming you're using the npmbuild branch. I've created a PR with initial code changes towards the problem.

I'm not sure if it makes sense to prepend the cwrcRootURL here (https://github.com/cwrc/Islandora-CWRC-Writer/blob/npmbuild/includes/utilities.inc#L1093-L1097) - could remove the file_create_url.

Here might be a better location (https://github.com/cwrc/CWRC-WriterBase/blob/dialogRefactor/src/js/dialogs/dialogForm.js#L231)

Which makes GitWriter more application independent?

Reference:

I've done the following on cwrc-dev-05. The following will be needed on the others servers after this fix is installed:

  1. admin/islandora/solution_pack_config/solution_packs and reinstall objects which will wipe the existing and replace with compatible schema objects (https and note template compatible)

    • CWRC Basic TEI Schema
    • CWRC Lite TEI Schema
    • Orlando Events Schema
    • Orlando Biography Schema
    • Orlando Writing Schema
    • CWRC Entry Schema
  2. for all custom schema objects (not part of the Drupal module), login to Fcrepo backend and edit RELS-EXT datastream and others if necessary to use both secure https and the new note templates.

@ajmacdonald
Copy link
Collaborator Author

@jefferya
I'd say it would be more application independent to assume that links to the entity templates are absolute URLs. That being the case, it would make more sense to prepend the root URL in the schemas config, rather than in the dialogForm.js code.

@ajmacdonald
Copy link
Collaborator Author

I'm not sure if this belongs in #15 or not, but the cwrcRootUrl being generated is incorrect, i.e. "http:///sites/default/modules/Islandora-CWRC-Writer/build/build/"

@jefferya
Copy link
Collaborator

@ajmacdonald

I think this is the needed code change - untested

    'cwrcRootUrl' => file_create_url($base_url."$cwrc_writer_path/"),
    // The url in which we provide services for.
    'baseUrl' => islandora_cwrc_writer_get_absolute_url(''),

With a drush cc all to perhaps flush the cache

@ajmacdonald
Copy link
Collaborator Author

Between this change and the ones that Jeff has made. This is now fixed.

@ilovan
Copy link
Contributor

ilovan commented Jan 30, 2018

@ajmacdonald

I am not sure if there's any way for me to test this from an user's perspective, as you mentioned that there are still issues with the citation and note miniWriters in the integrated version.

Any advice? if not, and you are confident this particular issue has been solved, I propose we close it.

@ajmacdonald
Copy link
Collaborator Author

@ilovan this fixes the issues with the miniWriters. If you can create a note or citation successfully, then I'd consider it fixed.

@ilovan
Copy link
Contributor

ilovan commented Jan 30, 2018

It looks like they are working consistent with the way they work in the GitWriter, so I will close this issue for now.

@ilovan ilovan closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants