Hi there,
I created a Publication Template using a schema - input form - javascript template configuration.
I then added the publication template in one of my delivery templates as seen below:
The issue here is that when i then try to use the input form from within the delivery template to edit the email content, i'm getting the below error:
I can't seem to find anything wrong in my schema/form definitions, both seem to be working fine (individually at least), and although i've worked extensively with Publication Templates in the past, i don't recall experiencing this error before.
Schema definition:
Form definition:
Publication template configuration:
Any insight around this would be really appreciated.
Thanks,
Solon
Solved! Go to Solution.
Hi,
I was using JavaScript template in the publication template. There is an option 'DOM interface'. When I unchecked this option, it worked for me.
Hi,
Can you please share in Schema what's your primary key? Error is more related to You missed to create primary key in your schema.
Thanks,
Kapil
Hi,
I didn't specify any primary keys, manually atleast. My understanding is that Adobe autogenerates a Primary Key anyways.
I found that i had to manually add the below, and it seemed to have rectified the issue:
I'm now experiencing another issue though, where when i reference any of the content fields in the Javascript Template by using <%= content.@FIELDNAME %>, i get the following error:
As an example, i'm referencing <%= content.@firstBanner_Alt %> in the Javascript Template, but i get an error when trying to Preview the content. Once i remove that reference, i can preview the content fine. Its obvious from the error that it can't find that XML field, even though the naming is correct.
Reference is the Javascript Template:
Below is the entire schema, taken from the preview tab:
<?xml version='1.0'?>
<schema _cs="GENERIC_CONTENT_TEMPLATE (gam)" created="2019-01-15 10:23:30.059Z" createdBy-id="435709339"
desc="Documents managed by the Content Manager module" entitySchema="xtk:schema"
genAccessors="false" img="ncm:content.png" implements="xtk:persist" label="GENERIC_CONTENT_TEMPLATE"
labelSingular="Content" lastModified="2019-05-31 14:55:18.343Z" mappingType="sql"
md5="0FF7AEDE2D8EF3506EE26EA4DA4439EF" modifiedBy-id="435709339" name="GENERIC_CONTENT_TEMPLATE"
namespace="gam" xtkschema="xtk:schema">
<enumeration basetype="short" default="Edition" name="status">
<value label="Edit" name="Edition" value="0"/>
<value label="To approve" name="ToValidate" value="1"/>
<value label="Approved" name="Validated" value="2"/>
<value label="Generated" name="Built" value="3"/>
<value label="Published" name="Published" value="4"/>
</enumeration>
<methods>
<method name="GetAndTransform" static="true">
<help/>
<parameters>
<param desc="URL to access XML data." name="url" type="string"/>
<param desc="Style sheet used for the transformation." name="xsl" type="string"/>
<param desc="Result" inout="out" name="data" type="DOMDocument"/>
</parameters>
</method>
</methods>
<enumeration basetype="byte" default="0" name="no_Yes_Enum">
<value label="Yes" name="1" value="1"/>
<value label="No" name="0" value="0"/>
</enumeration>
<enumeration basetype="byte" default="1" name="position_Enum">
<value label="1" name="1" value="1"/>
<value label="2" name="2" value="2"/>
<value label="3" name="3" value="3"/>
<value label="4" name="4" value="4"/>
<value label="5" name="5" value="5"/>
<value label="6" name="6" value="6"/>
<value label="7" name="7" value="7"/>
<value label="8" name="8" value="8"/>
<value label="9" name="9" value="9"/>
<value label="10" name="10" value="10"/>
<value label="11" name="11" value="11"/>
<value label="12" name="12" value="12"/>
<value label="13" name="13" value="13"/>
<value label="14" name="14" value="14"/>
<value label="15" name="15" value="15"/>
<value label="16" name="16" value="16"/>
<value label="17" name="17" value="17"/>
<value label="18" name="18" value="18"/>
<value label="19" name="19" value="19"/>
<value label="20" name="20" value="20"/>
</enumeration>
<element autopk="true" desc="Documents managed by the Content Manager module" folderLink="channel"
folderModel="ncmChannel" fullLoad="true" img="ncm:content.png" integrity="owncopy"
label="GENERIC_CONTENT_TEMPLATE" name="GENERIC_CONTENT_TEMPLATE" ownedBy="([@channel-id]!=0)"
pkSequence="XtkNewId" sqltable="NcmContent">
<compute-string expr="@name"/>
<dbindex name="id" unique="true">
<keyfield xpath="@id"/>
</dbindex>
<key internal="true" name="id">
<keyfield xpath="@id"/>
</key>
<dbindex name="name" unique="true">
<keyfield xpath="@name"/>
</dbindex>
<key name="name">
<keyfield xpath="@name"/>
</key>
<dbindex name="publishingNamespac">
<keyfield xpath="@publishing-namespace"/>
<keyfield xpath="@publishing-name"/>
</dbindex>
<dbindex name="channelId">
<keyfield xpath="@channel-id"/>
</dbindex>
<dbindex name="modifiedById">
<keyfield xpath="@modifiedBy-id"/>
</dbindex>
<dbindex name="createdById">
<keyfield xpath="@createdBy-id"/>
</dbindex>
<attribute desc="Internal primary key" label="Primary key" name="id" sqlname="iContentId"
type="long"/>
<attribute dataPolicy="identifier" default="GetOption('XtkInstancePrefix')+'CNT'+CounterValue('ncmContent')"
label="Internal name" length="64" name="name" required="true" sqlname="sName"
type="string"/>
<attribute default="NewLabel()" label="Label" length="128" localizable="true"
name="label" required="true" sqlname="sLabel" type="string"/>
<element label="Comment" localizable="true" name="comment" type="memo" xml="true"/>
<element defOnDuplicate="true" default="CurrentUser()" label="Created by" name="createdBy"
revLink="GENERIC_CONTENT_TEMPLATE-createdBy" target="xtk:operator" type="link">
<join xpath-dst="@id" xpath-src="@createdBy-id"/>
</element>
<attribute advanced="true" label="Foreign key of the link 'Created by' (field 'id')"
name="createdBy-id" sqlname="iCreatedById" type="long"/>
<element defOnDuplicate="true" default="CurrentUser()" label="Modified by" name="modifiedBy"
revLink="GENERIC_CONTENT_TEMPLATE-modifiedBy" target="xtk:operator"
type="link">
<join xpath-dst="@id" xpath-src="@modifiedBy-id"/>
</element>
<attribute advanced="true" label="Foreign key of the link 'Modified by' (field 'id')"
name="modifiedBy-id" sqlname="iModifiedById" type="long"/>
<attribute defOnDuplicate="true" default="GetDate()" desc="Creation date" label="Creation date"
name="created" sqlname="tsCreated" type="datetime"/>
<attribute defOnDuplicate="true" default="GetDate()" desc="Modification date"
label="Last modified" name="lastModified" pkgStatus="always" sqlname="tsLastModified"
type="datetime"/>
<attribute defOnDuplicate="true" desc="Document status" enum="status" label="Status"
name="status" sqlname="iStatus" type="short"/>
<attribute desc="Delivery subject" label="Subject" name="subject" type="string"
xml="true"/>
<element desc="Associated channel" label="Channel" name="channel" revLink="GENERIC_CONTENT_TEMPLATE"
target="ncm:channel" type="link">
<join xpath-dst="@id" xpath-src="@channel-id"/>
</element>
<attribute advanced="true" label="Foreign key of the link 'Channel' (field 'id')"
name="channel-id" sqlname="iChannelId" type="long"/>
<element desc="Publishing" label="Template" name="publishing" revLink="GENERIC_CONTENT_TEMPLATE"
target="ncm:publishing" type="link">
<join xpath-dst="@namespace" xpath-src="@publishing-namespace"/>
<join xpath-dst="@name" xpath-src="@publishing-name"/>
</element>
<attribute advanced="true" label="Foreign key of the link 'Template' (field 'namespace')"
length="16" name="publishing-namespace" sqlname="sPublishingNamespace"
type="string"/>
<attribute advanced="true" label="Foreign key of the link 'Template' (field 'name')"
length="80" name="publishing-name" sqlname="sPublishingName" type="string"/>
<element label="Data of content" name="data" sqlname="mData" type="memo"/>
<attribute label="Schema" length="80" name="xtkschema" sqlname="sXtkschema" type="string"/>
<attribute label="Data entry form in external window" length="80" name="editForm"
sqlname="sEditForm" type="string"/>
<element advanced="true" integrity="neutral" label="Current operator" name="currentOperator"
revLink="_NONE_" target="xtk:operator" type="link">
<join xpath-dst="@id" xpath-src="$(loginId)"/>
</element>
<element integrity="neutral" label="Delivery being analyzed" name="currentDelivery"
revLink="_NONE_" target="nms:delivery" type="link" visibleIf="NodeValue('/ignored/@currentDeliveryId')!=''">
<join xpath-dst="@id" xpath-src="$long(@currentDeliveryId)"/>
</element>
<element applicableIf="HasPackage('nms:interaction')" integrity="neutral" label="Offer being processed"
name="currentOffer" revLink="_NONE_" target="nms:offer" type="link"
visibleIf="NodeValue('/ignored/@currentOfferId')!=''">
<join xpath-dst="@id" xpath-src="$long(@currentOfferId)"/>
</element>
<element applicableIf="HasPackage('nms:centralLocal') and (@namespace!='nms' or @name!='delivery')"
integrity="neutral" label="Current order" name="currentOrder" revLink="_NONE_"
target="nms:localOrder" type="link" visibleIf="NodeValue('/ignored/@currentOrderId')!=''">
<join xpath-dst="@id" xpath-src="$long(@currentOrderId)"/>
</element>
<attribute enum="no_Yes_Enum" label="First Banner Included" name="firstBanner_Included"
type="byte" xml="true"/>
<attribute enum="position_Enum" label="Position" name="firstBanner_Position"
type="byte" xml="true"/>
<attribute label="Banner URL" name="firstBanner_URL" type="string" xml="true"/>
<attribute label="Banner Link" name="firstBanner_Link" type="string" xml="true"/>
<attribute label="Banner Alt" name="firstBanner_Alt" type="string" xml="true"/>
</element>
</schema>
Any help, appreciated.
Thanks,
Solon
Views
Replies
Total Likes
Hi Solon,
While Campaign autogenerates primary keys, it's still best practice to assign your own to avoid errors.
Best,
Pablo
Views
Replies
Total Likes
Hi Pablo,
Appreciate this is the case for standard schemas, but in my case i'm referring to a content management schema.
Reading through the online documentation Use case: creating content management , there is no mention or reference of manually defining any primary keys in order for this to work. As mentioned in my previous comments, i've previously managed to get this to work, by following the documentation and without defining any primary keys, so i'm curious if latest versions of Adobe Classic require a different approach to achieve this.
Thanks,
Solon
Views
Replies
Total Likes
Hi solva87,
I have also faced similar issue in content data schema and had to add pksequence in the schema to avoid this.
But now, I am also getting the same error(invalid XML) while using any field in the javascript template with syntax as <%= content.@attributeName %>
Was you able to resolve this issue or can someone help?
Views
Replies
Total Likes
Hi,
I am also getting invalid xml error in my publication template. Did you find a solution for it?
Views
Replies
Total Likes
Hi,
Unfortunately no, i haven't been able to find a solution to this as of yet.
I'd be very interested myself to know why this is happening, as this process is something that i've used in the past and was working fine, so it might be a case of something changing in latest versions of Adobe.
If anyone has any info around this, it would be really appreciated.
Thanks,
Solon
Views
Replies
Total Likes
Hi,
I was using JavaScript template in the publication template. There is an option 'DOM interface'. When I unchecked this option, it worked for me.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies