Open ajmacdonald opened 6 years ago
@ajmacdonald I am writing a new function cwrc_libraries_get_path - which is for now, calling libraries_get_path - the previous way to get the cwrc writer library.
I tried setting this up on dev 06 - but your version of cwrc writer doesn't seem to load well on it. https://cwrc-dev-06.srv.ualberta.ca/islandora/object/cwrc%3A93832f81-86ff-47a1-affe-df0eb1761d15#entities Should I be tyring this on dev 05?
Can I have access to this repo? bklaver
@bradklaver I've been trying on dev 05 in the past. Also, I've added you as a collaborator.
Hi both, I added @jefferya to the thread here. It is imperative that we have a working version of CWRC-Writer integrated into dev-06 as soon as possible.
Dev 05 is a "naked" version of Islandora where @ajmacdonald had (briefly) a very early version of the integrated CWRC-Writer up and running. It would be useful - I think - to have a working version of CWRC-Writer integrated into dev-05, even if just so that we have a point of reference to refer back to if we run into any issues with integrating into one of the Echidna sandboxes.
Since dev-05 does not contain any Echidna code at the moment - I am not sure to what extent having you poke at it would help, @bradklaver , but I might be wrong - so please say so if I do.
Re the version of CWRC-Writer that is not working on dev-06, as you probably know, it's not easy to tell from the web browser what's wrong with it.
@ajmacdonald , @bradklaver , would it help if Andrew had access to the dev-06 server to help troubleshoot the issue?
Also, all three of you - am I right in suspecting that having the dev-05 version up and running would still be useful as a control? Could you bring it back up, @ajmacdonald ?
Update: @jefferya will soon grant Brad and Luke access to the dev-05 server and Andrew access to dev-06 and notify both when done.
@ilovan: ssh public keys added
@ajmacdonald I've pushed a branch to this repo: npmbuild. It rewrites how CWRC_writer gets the library.
When I go to Dev 05, I don't see cwrc writer working anywhere.
And any of the CWRC WRiter Document objects I tried didn't render properly. I tried in Chrome and Firefox.
I wondered if it may be because the library fix wasn't added yet, so I ssh'd in, and went to /var/www/html/drupal7/sites/default/modules/islandora_cwrc_writer - temporarily removed the untracked build, node_modules and packages-lock item,s then ran git checkout npmbuild. I still couldn't get any of the Objects to render CWRC WRiter properly. I checked out 7.x and put the untracked files back.
I wanted to try dev05 in case there was an issue between our DE code.
I"m fine with Andrew trying things on Dev 06
@bradklaver Thanks Brad, I'll see if I can get the npmbuild branch working on dev05
@bradklaver It's now loading the JS files however it's not working yet. Besides the layout error alerts (which I can fix) it's still pulling the JS files from the libraries directory instead of modules.
Here is where I'm doing the testing: https://cwrc-dev-05.srv.ualberta.ca/islandora/object/cwrc%3Ab93a8a9c-8dbc-4cd2-94e3-ae9e6d422de8
Please see the two app.js entries in the attached image:
@bradklaver I've done some more testing. The key point is this line: https://github.com/cwrc/Islandora-CWRC-Writer/blob/npmbuild/islandora_cwrc_writer.module#L263
I tried changing it from 'path' => 'build',
to 'path' => cwrc_libraries_get_path()
which is getting close but it's not quite there as it produces this URL for app.js: https://cwrc-dev-05.srv.ualberta.ca/sites/default/libraries/CWRC-GitWriter/sites/default/modules/Islandora-CWRC-Writer/build/js/app.js
@ajmacdonald I've got app.js referenced properly, but there's another js error. I think things aren't being loaded in the right order, its saying $.once() isn't a function. Let me know if you've got an approach to that, I can look at it again in a bit. http://cwrc-dev-05.srv.ualberta.ca/islandora/object/cwrc%3A73e207f2-1577-4a16-8715-bf48886851f8
@bradklaver this seems to be a case of multiple versions of jQuery being loaded. Drupal seems to want to use v 1.10 and CWRC-Writer uses v 3.10. I'll see what I can do about it.
@ajmacdonald How's this going? Anything else you'd like me to do?
@bradklaver Hi Brad, I've made good progress on my end but I need your help with a few things:
$cwrc_writer_path
seems to be adding an extra build/
, i.e. https://cwrc-dev-05.srv.ualberta.ca/sites/default/modules/Islandora-CWRC-Writer/build/build/
I tried modifying this but it didn't seem to make a difference.
Can you add an islandora_cwrc_writer_default_western_tabs_content
function to populate this field?
It should produce the following HTML:
<div id="entities"></div>
<div id="structure"></div>
<div id="relations"></div>
Thank you!
The location of the CWRC Writer is moving into the module and needs to be changed in the code. The old location was: "libraries/CWRC-GitWriter/build" The new location should be: "modules/Islandora-CWRC-Writer/build"
Here are (I believe) the relevant places: https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/islandora_cwrc_writer.module#L12 (not sure if this is a directory reference or not) https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/islandora_cwrc_writer.module#L263 (the directory would still be "build" so maybe this one doesn't need to change) https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/islandora_cwrc_writer.module#L305
https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/includes/utilities.inc#L161 (uses "libraries_get_path" but the new location wouldn't be in libraries) https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/includes/utilities.inc#L165 https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/includes/utilities.inc#L1091 https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/includes/utilities.inc#L1093-L1094
https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/theme/theme.inc#L54 (this is using "libraries_load" but the new location wouldn't be in libraries) https://github.com/cwrc/Islandora-CWRC-Writer/blob/7.x/theme/theme.inc#L235