Comment 2 for bug 1997298

Revision history for this message
Robert Lyon (robertl-9) wrote :

Here are some testing instructions to replicate the issue:

1) Create site and login as admin
2) Turn on annotation blocktype in Extensions -> Plugin administration (if it's not active)
3) In Institutions -> Settings enable Smart Evidence for 'mahara' institution
Login as normal user
4) make a blank page (Create button)
5) make a collection (Create button) and choose a 'SmartEvidence framework' then save and add the page to it
6) Go to the collection an on the Smart Evidence page of collection click a spot
7) add annotation text AND embed an image by uploading a new image
8) go to the normal page of the collection
9) copy the collection via the 3 dots menu on right and choose 'collection'

Get the error!!!!

[WAR] 1a (lib/collection.php:711) Undefined offset: 184
[WAR] 1a (lib/collection.php:711) Trying to get property 'view' of non-object

The reason for this (I believe) is the SQL to match up the evidence finds not only the annotation artefact attached to the block (the block id found in the annotation column in framework_evidence table) but also the embedded image artefact associated with the block (vie view_artefact table) and it's trying to handle this artefact as an annotation artefact too and failing