-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
On production we were getting lots of errors when attempting to load:
/v2/player/player/session/598b157ae4b0f02645c1b090/passages/9243.html
The item id for this session is: 5902f10722615551ebf0c866:0.
playerDefinition.xhtml:
<div class=\"item-body qti\">
<stylesheet href=\"styles/export_package_cc_ela_teacher_grade-8.css\" type=\"text/css\"></stylesheet>
<div>
<div class=\"passage\"></div>
<div class=\"passage\"></div>
</div>
<div style=\"\"> <object type=\"text/html\" data=\"passages/9249.html\"></object> </div>
<div style=\"\"> <object type=\"text/html\" data=\"passages/9243.html\"></object> </div>
<div> Select whether each detail appears in "Paul Revere's Ride," "Paul Revere," or both. </div>
<p class=\"prompt\"></p>
<corespring-match id=\"RESPONSE\"></corespring-match>
</div>
This item stores the passages (9249.html and 9243.html) in S3 and as a virtual file in mongo:
{
"_t" : "org.corespring.platform.core.models.item.resource.VirtualFile",
"contentType" : "text/html",
"name" : "9243.html",
"content": ".."
},
{
"_t" : "org.corespring.platform.core.models.item.resource.VirtualFile",
"contentType" : "text/html",
"name" : "9249.html",
"isMain" : false,
"content": "..."
}the markup is stored in s3 like so:
aws s3api head-object --bucket corespring-assets-staging --key 5902f10722615551ebf0c866/0/data/9243.html
{
"AcceptRanges": "bytes",
"ContentType": "application/octet-stream",
"LastModified": "Mon, 05 Jun 2017 12:22:01 GMT",
"ContentLength": 12254,
"ETag": "\"e37efd25b16527cd41c4f9a828e048e7\"",
"Metadata": {}
}So there are alot of problems with the above:
- The player tries to load
passages/$name.htmlbut the passage is stored at$name.html- eitherplayerDefinition.xhtmlis wrong or the passages are stored in the wrong location. - The passages appear to be stored both in mongo and on S3.
- When stored on S3 the
ContentTypeisapplication/octet-streamwhich won't render correctly in a browser, theContentTypeneeds to betext/html - The structure in
playerDefinition.xhtmllooks broken, we have<div class="passage></div>then underneath we have an `. My guess is that these objects tags should ben inside the divs which are linked to an angular js directive. - When loading a file from the player it only appears to check s3, it doesn't look at virtual files - is that correct?
Where are these items from
https://gist.github.com/edeustace/97a39acc6d848b361ce2fa25a23d246d
Progress Testing 1470
Rainforest Samples 1
Progress Testing (old) 490