December 9, 2019 at 1:11 pm #4655
I’m a bit new to PennController, so I apologize if this ends up being a bit of a simple question, but I’m having a peculiar issue where certain screens are only being loaded when they are placed in certain orders in the Sequence command (but unfortunately, not in the order I need them in). Basically, my Sequence call looks like this:
PennController.Sequence( "setcounter", "study intro", //does NOT appear "consent", //does NOT appear "metadata", //does NOT appear "instructions", //does NOT appear "checkload", "practice", "practice end", //does appear rshuffle("target", "filler"), "end_experiment", "study end", //does appear "contact", //does appear "sendRes"
The issue is that the four screens prior to the actual experiment do not load at all — nothing appears in the code when I inspect the page. This is despite the fact that the code for these screens is the exact same as for the three screens that DO appear in the middle and after the main experiment.
Here’s where things get a little funny: in attempting to fix the issue, I’ve tried rearranging the items. If I place the non-loading items after “checkload” (a CheckPreloaded call), none of them appear; if I do so, and duplicate one of the screens immediately after the “checkload” command, the four screens DO load, with the exception of the duplicated screen. I’m not sure how much insight this provides to the issue, but it seems evident to me that something about one of the commands dictates the screen order, but I can’t find anything in the documentation for any of the code used that would influence or require a specific order. Any thoughts on what the issue might be, or how to fix it?December 9, 2019 at 8:03 pm #4656
What you’re describing definitely sounds like a bug to me. Unfortunately I haven’t experienced or heard of anything similar before, so it’s a little hard to diagnose as such. Would you mind giving me a link to your experiment? Thank you.
JeremyDecember 10, 2019 at 11:58 am #4657
Sent via email! Thank you!December 10, 2019 at 7:40 pm #4658December 11, 2019 at 12:12 pm #4659
Resent to the admin email. Sorry for the trouble!December 13, 2019 at 5:53 pm #4660
The problem seems to be related to the way PennController handles cross-trial references to Var elements. In this case, a newVar command with .settings.global() inside a Header was causing an “undefined” error the first time the trials were run only—the second time, the Var element having already been created the first time seemed to “fix” the error, in a way.
This bug, and other bugs related to Var elements, should be fixed in the next (and upcoming) release of PennController, version 1.7.
You must be logged in to reply to this topic.