Why am I getting error “Cannot find default value for object.” when trying to create a new print section in a control script? I’ve tried a lot of different things and can’t seem to get past this. I’ve removed everything except for just this line “var testclone = merge.template.contexts.PRINT.sections[‘test’].clone();” and I get the same error.
Hi Rick,
Should it rather be…
var testclone = merge.template.contexts.PRINT.sections[“test”].clone();
Regards,
S
Make sure you are running PlanetPress Connect v1.5 at least. The clone() function was introduced in 1.5.
Either of the below expressions should work in v1.5:
var testclone = merge.template.contexts.PRINT.sections[‘test’].clone();
var testclone = merge.template.contexts.PRINT.sections[“test”].clone();
var testclone = merge.template.contexts.PRINT.sections.test.clone();
Thanks Rod, that’s the issue then. -rick