<div dir="ltr">Hi Dave, <div><br></div><div>There was nothing logged in the apache error log. I don't think I have newlines in any of the instruments. If this is just an issue with our instance of LORIS and you can't recreate the issue, I can troubleshoot it more in the future. For now it's not urgent. I'll follow up if I have further questions. </div><div><br></div><div>-Eli</div><div><br></div><div><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:12.8px">Eli Johnson</span><br></div>Developer/Data Manager<br>Institute of Child Development<br>University of Minnesota<div><a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 16, 2021 at 11:29 AM Dave MacFarlane <<a href="mailto:dave.macfarlane@mcin.ca" target="_blank">dave.macfarlane@mcin.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Eli,</div><div><br></div><div>I'm not able to reproduce this on the raisinbread dataset. It sounds like LORIS is generating the "Content-Length" header based on the json data, but something is printing newlines before the output is sent, resulting in the browser reading those, and then stopping reading once Content-length bytes are read.</div><div><br></div><div>The main change in the diff between the v23.0.0 and v23.0.8 versions in the module seems to be that it instantiates instruments to get the table name now, suggesting it might be a problem originating from one of your instruments. I tried adding a print newline into the setup function of an arbitrary instrument and got warnings such as:</div><div><br>
<b>Warning</b>: Cannot modify header information - headers already sent
by (output started at
/home/driusan/Code/Loris/project/instruments/NDB_BVL_Instrument_mri_parameter_form.class.inc:53)
in <b>/home/driusan/Code/Loris/htdocs/index.php</b> on line <b>60</b></div><div><b><br></b></div><div>but it's possible that the display of the warning is php.ini sensitive. I also tried adding newlines after the PHP closing tag in some files and got the same warning.</div><div><br></div><div>Those warnings some from the PHP side, but on the loris side there should also be an error logged to your apache logs if there's a problem instantiating the instrument:</div><div><br></div><div><table><tbody><tr><td><span> <span>error_log</span>(</span></td>
</tr>
<tr>
</tr></tbody></table><table><tbody><tr><td>
<span> <span>"There was a problem instantiating the instrument "</span>.</span></td>
</tr>
<tr>
</tr></tbody></table><table><tbody><tr><td>
<span> <span>"'$instrument'. Make sure the instrument is valid and "</span>.</span></td>
</tr>
<tr>
</tr></tbody></table><table><tbody><tr><td>
<span> <span>"functional in order for it to be displayed in the data "</span>.</span></td>
</tr>
<tr>
</tr></tbody></table><table><tbody><tr><td>
<span> <span>"dictionary."</span></span></td>
</tr>
<tr>
</tr></tbody></table>
<span> );</span></div><div><span><br></span></div><div><span>It shouldn't cause newlines to be printed, but it's possible that something in the attempt to instantiate the instrument does. Do you get that error in your logs?</span></div><div><span><br></span></div><div><span>- Dave<br></span></div><div><b></b></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 11, 2021 at 7:17 PM Eli Johnson <<a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Dave, <div><br></div><div>I reverted to the v23.0.0 version of the datadict module and it's working properly again. </div><div><br></div><div>I did inspect the returned values -- the json data package returned by "<lorisurl>/datadict/?format=json" appears to be cut off. For some reason it looks like ~40 newlines have been added before the json begins and then an equivalent number of characters have been cut off from the end. I didn't find any obvious issues when briefly inspecting the v23.0.8 changes to php/datadict.class.inc but something there appears to be the source of the issue. </div><div><br></div><div>Best, </div><div>Eli</div><div><div><br></div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:12.8px">Eli Johnson</span><br></div>Developer/Data Manager<br>Institute of Child Development<br>University of Minnesota<div><a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a></div></div></div></div></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 11, 2021 at 8:24 AM Dave MacFarlane <<a href="mailto:dave.macfarlane@mcin.ca" target="_blank">dave.macfarlane@mcin.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Eli,</div><div><br></div><div>I'm not sure why that would have broken between 2 bug fix releases, but the error "SyntaxError: Unexpected end of JSON input" implies that the attempt to fetch the fields returned invalid input. This can happen if, for instance, an exception is thrown by the ajax request. If you open the network tab* in your developer tools before loading the page there should be a request for "(your url)/datadict/fields". Click on that, and then the "Response" tab* in the network tools and you should get a better idea of what's being returned to debug.</div><div><br></div><div>* That's how they're labeled in Firefox. I'm not sure off the top of my head what the labels are in Chrome but it should be similar.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 10, 2021 at 2:29 PM Eli Johnson <<a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am updating from LORIS v23.0.2 to v23.0.8 (running on RHEL7). Everything is working except the data dictionary. I'm getting an error when trying to load the data dictionary module. The data dictionary page contains the text "An error occurred while loading the page", there is nothing logged in the apache error-log, the browser console reports "SyntaxError: Unexpected end of JSON input" on dataDictIndex.js:49. I'm not super familiar with react so I'm not sure how to find the source of the error although it looks like it's occurring on <i>fetchData</i>. Any idea why this would happen or suggestions on how to debug?</div><div><br></div><div>Thanks, </div><div>Eli</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:12.8px">Eli Johnson</span><br></div>Developer/Data Manager<br>Institute of Child Development<br>University of Minnesota<div><a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote></div>
</blockquote></div>
</div>
</blockquote></div>
</blockquote></div>