{"action":"closed","issue":{"url":"https://api.github.com/repos/mnylc/islandora_multi_importer/issues/89","repository_url":"https://api.github.com/repos/mnylc/islandora_multi_importer","labels_url":"https://api.github.com/repos/mnylc/islandora_multi_importer/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/mnylc/islandora_multi_importer/issues/89/comments","events_url":"https://api.github.com/repos/mnylc/islandora_multi_importer/issues/89/events","html_url":"https://github.com/mnylc/islandora_multi_importer/issues/89","id":362671010,"node_id":"MDU6SXNzdWUzNjI2NzEwMTA=","number":89,"title":"Islandora Context and derivative hook alter breaks IMI's FakeObject","user":{"login":"DiegoPino","id":6946023,"node_id":"MDQ6VXNlcjY5NDYwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6946023?v=4","gravatar_id":"","url":"https://api.github.com/users/DiegoPino","html_url":"https://github.com/DiegoPino","followers_url":"https://api.github.com/users/DiegoPino/followers","following_url":"https://api.github.com/users/DiegoPino/following{/other_user}","gists_url":"https://api.github.com/users/DiegoPino/gists{/gist_id}","starred_url":"https://api.github.com/users/DiegoPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiegoPino/subscriptions","organizations_url":"https://api.github.com/users/DiegoPino/orgs","repos_url":"https://api.github.com/users/DiegoPino/repos","events_url":"https://api.github.com/users/DiegoPino/events{/privacy}","received_events_url":"https://api.github.com/users/DiegoPino/received_events","type":"User","site_admin":false},"labels":[{"id":658948321,"node_id":"MDU6TGFiZWw2NTg5NDgzMjE=","url":"https://api.github.com/repos/mnylc/islandora_multi_importer/labels/Integrations","name":"Integrations","color":"b60205","default":false},{"id":318192553,"node_id":"MDU6TGFiZWwzMTgxOTI1NTM=","url":"https://api.github.com/repos/mnylc/islandora_multi_importer/labels/bug","name":"bug","color":"fc2929","default":true},{"id":318192555,"node_id":"MDU6TGFiZWwzMTgxOTI1NTU=","url":"https://api.github.com/repos/mnylc/islandora_multi_importer/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"DiegoPino","id":6946023,"node_id":"MDQ6VXNlcjY5NDYwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6946023?v=4","gravatar_id":"","url":"https://api.github.com/users/DiegoPino","html_url":"https://github.com/DiegoPino","followers_url":"https://api.github.com/users/DiegoPino/followers","following_url":"https://api.github.com/users/DiegoPino/following{/other_user}","gists_url":"https://api.github.com/users/DiegoPino/gists{/gist_id}","starred_url":"https://api.github.com/users/DiegoPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiegoPino/subscriptions","organizations_url":"https://api.github.com/users/DiegoPino/orgs","repos_url":"https://api.github.com/users/DiegoPino/repos","events_url":"https://api.github.com/users/DiegoPino/events{/privacy}","received_events_url":"https://api.github.com/users/DiegoPino/received_events","type":"User","site_admin":false},"assignees":[{"login":"DiegoPino","id":6946023,"node_id":"MDQ6VXNlcjY5NDYwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6946023?v=4","gravatar_id":"","url":"https://api.github.com/users/DiegoPino","html_url":"https://github.com/DiegoPino","followers_url":"https://api.github.com/users/DiegoPino/followers","following_url":"https://api.github.com/users/DiegoPino/following{/other_user}","gists_url":"https://api.github.com/users/DiegoPino/gists{/gist_id}","starred_url":"https://api.github.com/users/DiegoPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiegoPino/subscriptions","organizations_url":"https://api.github.com/users/DiegoPino/orgs","repos_url":"https://api.github.com/users/DiegoPino/repos","events_url":"https://api.github.com/users/DiegoPino/events{/privacy}","received_events_url":"https://api.github.com/users/DiegoPino/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-09-21T15:38:52Z","updated_at":"2018-10-01T14:54:05Z","closed_at":"2018-10-01T14:54:05Z","author_association":"CONTRIBUTOR","body":"IMI uses a fake Object that implements Abstract Object to inspect which derivatives are available and allow people to decide how to manage the required data streams per CMODEL. \r\n`Abstract Object` _per se_ does not implement ::relationships, either external or internal, but sadly as a design feature? or weakness in the whole Islandora Environment many of the function/hook signatures used require only that the passed  Islandora Object is Abstract Object argument. We actually made good use of that (so we feel it is a feature) but this which can lead other pieces of software, like the altering hooks and implementers to believe that there is no need to check for the existence or not of public methods or even to which class a particular (or what class it implements) belongs. Since this is a common use, there is no blame really, but this breaks IMI.\r\n\r\nOther than IMI, one other of those places where this becomes confusing is with Batch Object and in lesser degree with NewFedoraObject.\r\n\r\nOur main issue happens when Islandora Context is enabled and we try to invoke the derivative alter hooks which end calling \r\n\r\nhttps://github.com/SFULibrary/islandora_context/blob/f75ac720a4d8252a50bef6b542e73887cb6eaed1/plugins/islandora_context_condition_is_islandora_object.inc#L74\r\n\r\nSince FakeObject does not implement $relationships and of course, as consequence, neither the get methods, we get a big error. Since also IMI uses Ajax, that error is deal breaking.\r\n\r\nInstead of asking Context to check of FedoraObject instance of the object, i will try to mock relationships for our FakeObject in a good enough degree.\r\n\r\nSimpler solution would be to simply ignore that particular context hook but would bring funnily a indirect dependency of Context to our code i would have trouble explaining\r\n\r\n@kromabiles i will track https://github.com/SFULibrary/islandora_context/issues/52 here"}}
{"actor":{"display_login":"DiegoPino"}}