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

DESTROY ISLANDORACM!!! #90

Merged
merged 3 commits into from
Sep 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions islandora_newspaper.module
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@ function islandora_newspaper_islandora_required_objects(IslandoraTuque $connecti
$newspaper_content_model->owner = 'fedoraAdmin';
$newspaper_content_model->label = 'Islandora Newspaper Content Model';
$newspaper_content_model->models = 'fedora-system:ContentModel-3.0';
// ISLANDORACM datastream.
$datastream = $newspaper_content_model->constructDatastream('ISLANDORACM', 'X');
$datastream->label = 'Islandora Newspaper Content Model';
$datastream->mimetype = 'text/xml';
$datastream->setContentFromFile("$module_path/xml/content_models/newspaperCModel.xml", FALSE);
$newspaper_content_model->ingestDatastream($datastream);
// DS-COMPOSITE-MODEL datastream.
$datastream = $newspaper_content_model->constructDatastream('DS-COMPOSITE-MODEL', 'X');
$datastream->label = 'DS-COMPOSITE-MODEL';
Expand All @@ -177,12 +171,6 @@ function islandora_newspaper_islandora_required_objects(IslandoraTuque $connecti
$newspaper_issue_content_model->owner = 'fedoraAdmin';
$newspaper_issue_content_model->label = 'Islandora Newspaper Issue Content Model';
$newspaper_issue_content_model->models = 'fedora-system:ContentModel-3.0';
// ISLANDORACM datastream.
$datastream = $newspaper_issue_content_model->constructDatastream('ISLANDORACM', 'X');
$datastream->label = 'Islandora Newspaper Issue Content Model';
$datastream->mimetype = 'text/xml';
$datastream->setContentFromFile("$module_path/xml/content_models/newspaperIssueCModel.xml", FALSE);
$newspaper_issue_content_model->ingestDatastream($datastream);
// DS-COMPOSITE-MODEL datastream.
$datastream = $newspaper_issue_content_model->constructDatastream('DS-COMPOSITE-MODEL', 'X');
$datastream->label = 'DS-COMPOSITE-MODEL';
Expand All @@ -195,12 +183,6 @@ function islandora_newspaper_islandora_required_objects(IslandoraTuque $connecti
$newspaper_page_content_model->owner = 'fedoraAdmin';
$newspaper_page_content_model->label = 'Islandora Newspaper Page Content Model';
$newspaper_page_content_model->models = 'fedora-system:ContentModel-3.0';
// ISLANDORACM datastream.
$datastream = $newspaper_page_content_model->constructDatastream('ISLANDORACM', 'X');
$datastream->label = 'Islandora Newspaper Page Content Model';
$datastream->mimetype = 'text/xml';
$datastream->setContentFromFile("$module_path/xml/content_models/newspaperPageCModel.xml", FALSE);
$newspaper_page_content_model->ingestDatastream($datastream);
// DS-COMPOSITE-MODEL datastream.
$datastream = $newspaper_page_content_model->constructDatastream('DS-COMPOSITE-MODEL', 'X');
$datastream->label = 'DS-COMPOSITE-MODEL';
Expand Down
6 changes: 3 additions & 3 deletions xml/collection/islandora_newspaper_collection_policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Newspaper collection"
xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="New TIFF" namespace="islandora:collection"
<content_model dsid="" name="New TIFF" namespace="islandora:collection"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After applying this locally I can no longer view the newspaper collection object. I get schema validation collection policy is not valid. Does this depend on a pull request to islandora collection or islandora. I think I pulled all the latest last friday (sept 12 2014)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm. Islandora/islandora_solution_pack_collection#117 was merged 4 days ago, and should take care of it. Testing out on my VM right now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the latest from islandora_solution_pack_collection 7.x. is that the right branch? I'll try running update.php again just in case something is cached.

You may have to update the solutions pack required objects as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not having any issues with HEAD and this pull request.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you do a drush cc all?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is something weird happening as I'm getting an error:
Warning: DOMDocument::schemaValidate(): Element '{http://www.islandora.ca}collection_policy': Missing child element(s). Expected is one of ( {http://www.islandora.ca}content_models, {http://www.islandora.ca}staging_area ). in CollectionPolicy->__construct() (line 50 of /var/www/drupal/htdocs/sites/all/modules/islandora_solution_pack_collection/includes/collection_policy.inc). InvalidArgumentException: The given collection policy is not valid. in CollectionPolicy->__construct() (line 51 of /var/www/drupal/htdocs/sites/all/modules/islandora_solution_pack_collection/includes/collection_policy.inc).

Which to me makes sense as after I apply the pull request my collection policy looks like:
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Newspaper collection" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd"> <search_terms></search_terms> <relationship>isMemberOfCollection</relationship> </collection_policy>

If I load that in oxygen and try to validate it against the xsd located in the collection solution packs xml directory it fails. The xsd looks like it hasn't been updated in 2 years and it also looks like our code still tries to use it. If I look at line 50 of collection_policy.inc it still has code to load the xsd and tries to validate the collection_policy datastream. I'm looking at the 7.x branch of collection solution pack and the 7.x branch of the newspaper solution pack with this pull request applied.

I'll poke around some more to see what I'm missing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't completely nuke the line for content models they are critical. Related: Islandora/islandora_solution_pack_collection#117 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what I thought as well which is why i was confused when it seemed to be working for Nick.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm firing up a clean VM with HEAD. I'll work through all of the ISLANDORA-962 pull requests, and do some more thorough testing. My apologies for any frustrations/wasted time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed 😄

screenshot from 2014-09-15 21 52 00

I'll put the collection policy back the way it was, and if that works, I'll update this pull request, and the others. And, create 7.x-1.4 pull requests as well.

pid="islandora:newspaperCModel"/>
<content_model dsid="ISLANDORACM" name="New TIFF" namespace="islandora:collection"
<content_model dsid="" name="New TIFF" namespace="islandora:collection"
pid="islandora:collectionCModel"/>
</content_models>
<search_terms/>
<relationship>isMemberOfCollection</relationship>
</collection_policy>
</collection_policy>
18 changes: 0 additions & 18 deletions xml/content_models/newspaperCModel.xml

This file was deleted.

18 changes: 0 additions & 18 deletions xml/content_models/newspaperIssueCModel.xml

This file was deleted.

28 changes: 0 additions & 28 deletions xml/content_models/newspaperPageCModel.xml

This file was deleted.