[4.2] - Card not loading in Live Preview

Posted by IramK on 15-Dec-2016 10:39

Hello,

I have created a mobile card for both smartphone and tablet in V4.2. and I get an error when I try to load it. There are quite a few bugs in this version in relation to the card creation and display process. The error is given below:

Also, when I try to import it into the beta environment, none of my cards shows up. Are there any switches that need to be switched on during the import?

Cheers.

Iram

Uncaught TypeError: Cannot convert undefined or null to object
at Object.eval (eval at compile (kendo.all.min.js:25), <anonymous>:3:60)
at i (jquery.min.js?v=4.2.0.0:3)
at Object.render (kendo.all.min.js:25)
at Object.i [as render] (jquery.min.js?v=4.2.0.0:3)
at init._renderItems (kendo.all.min.js:106)
at init.insertAt (kendo.all.min.js:106)
at init.append (kendo.all.min.js:106)
at new init (kendo.all.min.js:106)
at item (kendo.all.min.js:106)
at init.refresh (kendo.all.min.js:106)

Posted by IramK on 16-Dec-2016 05:48
Hello Ranjana,
 
Yes, MobileCards is a part of DataObjectDef. Thanks for providing a resolution to fix that issue with the import. I can confirm that replacing a148 with MobileCard works and I am able to import my cards into the beta environment.
 
Cheers,
Iram
 

All Replies

Posted by Vimalkumar Selvaraj on 15-Dec-2016 23:16

Hi Iram,

For your first issue did you create card by using our default design or created your own card?.. From error i could assume there might be a problem with your card template. Could you get the template HTML from card editor (source view) and place it here so that we can check if something wrong with your template?. One suggestion is we improved Card Editor and added support for desktop cards as well in latest version. I recommend you to try card creation with latest version and provide your suggestion.

For your second issue we are looking into it and will update you soon..

Thanks,

Vimal.

Posted by IramK on 16-Dec-2016 03:27

Hi [mention:42160dba41d64dbc8b8d9a18cc00ee48:e9ed411860ed4f2ba0265705b8793d05] ,

I created my own card. I have posted the HTML template below. Kindly get back to me once you have found the issue with both the scenarios mentioned please.

<style id="cardEditorStylesId">.rbs-dataColumn-label, .rbs-dataColumn-value { border: 1px dotted darkslategrey; }
.rbs-dataColumn-highlight-label { border: 2px dashed blue; }
.rbs-dataColumn-highlight-value { border: 2px dashed green; }
</style>
<table width="100%"><tbody><tr><td style='padding:0.5rem;padding-right:0;' valign='top' width='60%'><table style='width:100%;'><tbody><tr><td style='color:#084D7F;font-weight:bolder;font-size:1.2rem;'><span class='rbs-marker-cardtemplate-field-configurable rbs-dataColumn-value' data-accesstype='string' data-column-id='firstName' data-column-type='value' rbs-uid='firstName'>M</span><span class='rbs-marker-cardtemplate-field-configurable rbs-dataColumn-value' data-accesstype='string' data-column-id='lastName' data-column-type='value' rbs-uid='lastName'>K</span></td>
</tr>
<tr style='height:1rem;'></tr>
<tr><td><div class='rbs-marker-cardtemplate-field-configurable' data-accesstype='string' data-column-id='contactRole' data-column-type='value' rbs-uid='description' style='font-weight:bold;'>Sample Text</div></td>
</tr>
<tr style='height:1rem;'></tr>
<tr><td><div class='rbs-marker-cardtemplate-field-configurable' data-accesstype='string' data-column-id='contactType' data-column-type='value' rbs-uid='companyName' style='color:red;'>Sample Text</div></td>
</tr>
<tr><td><div class='rbs-marker-cardtemplate-field-configurable' data-accesstype='string' data-column-id='contactCountry' data-column-type='value' rbs-uid='companyAddress' style='opacity:0.75;'>[J@5d587c5d</div></td>
</tr>
</tbody></table>
</td>
<td style='padding-right:0.5rem;' valign='top' width='20%'><span class='rbs-dataColumn-value' contenteditable='false' data-column-id='rbsCardObjectDrillDown' data-column-type='value'><em class='fa rbs-obj-drill-down-icon'></em></span></td>
</tr>
</tbody></table>
Posted by Vimalkumar Selvaraj on 16-Dec-2016 04:51

Hi Iram,

To me your template looks fine no issues with it, but we had couple of issues around certain field type  that get fixed in later releases. Would it be possible for you to create this same card from EAP and confirm whether you still see this issue?.

You can copy this HTML and create new card from EAP.

Thanks,

Vimal.

Posted by IramK on 16-Dec-2016 05:02

Hi Vimal,

Yes, I did try that and have managed to create the card in the EAP successfully. The live preview of it works nicely as well in the EAP. So, how do you think we need to go about this because we have created all of our mobile cards in 4.2 and don't want to go and recreate them in the next version we upgrade to. I can see that the mobile card is available in the app xml when we export. Please provide some suggestions to this scenario.

Cheers.

Iram

Posted by Ranjana sinha on 16-Dec-2016 05:09

Hi Iram,

Are you able to see MobileCard keyword as well withing the  MobileCards tag? If not , then obfuscation is the issue and we need to replace the obfuscated keyword with MobileCard.

Also after upgrade if you generate the XML and export it will work fine. Could you please try that?

Regards,

Ranjana Sinha

Posted by IramK on 16-Dec-2016 05:19

Hello [mention:72a479e40a674b9c88ad814f00b56636:e9ed411860ed4f2ba0265705b8793d05] ,

No, I don't see the MobileCard keyword within the MobileCards tag. So, as you suggested, that would be the issue. This is the part of the app XML that contains the mobile cards tag. How can I fix the app xml so that the import goes through successfully?

<MobileCards>
<a148 id="4982725" origId="SPsqPxNSRLOOwncdrT4QEw" name="Acc Default View Demo" template="&lt;div style=&quot;padding:10px;&quot;&gt;&lt;span class=&quot;rbs-dataColumn-value rbs-card-def-layout-val&quot; data-column-id=&quot;name&quot; data-column-type=&quot;value&quot; title=&quot;value - name&quot;&gt;Object Name&lt;/span&gt;&lt;span class=&quot;rbs-dataColumn-value&quot; contenteditable=&quot;false&quot; data-column-id=&quot;rbsCardObjectDrillDown&quot; data-column-type=&quot;value&quot;&gt;&lt;em class=&quot;fa rbs-obj-drill-down-icon&quot;&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&#160;&#160;&lt;span class=&quot;rbs-dataColumn-value&quot; data-column-id=&quot;accountType&quot; data-column-type=&quot;value&quot; title=&quot;value - accountType&quot;&gt;14620&lt;/span&gt;" version="1" default="false" >
<props>
<smartPhone>true</smartPhone>
<tablet>true</tablet>
<desktop>false</desktop>
</props>
</a148>
<a148 id="4982721" origId="lCSbgiJHSoWGcxGKdWcqVg" name="test card" template="&lt;div style=&quot;padding:10px;&quot;&gt;&lt;span class=&quot;rbs-start-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-start-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-start-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-start-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-start-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-dataColumn-value rbs-card-def-layout-val&quot; data-column-id=&quot;name&quot; data-column-type=&quot;value&quot; title=&quot;value - name&quot;&gt;Object Name&lt;/span&gt;&lt;span class=&quot;rbs-dataColumn-value&quot; data-column-id=&quot;accountType&quot; data-column-type=&quot;value&quot; title=&quot;value - accountType&quot;&gt;14620&lt;/span&gt;&lt;span class=&quot;rbs-dataColumn-value&quot; contenteditable=&quot;false&quot; data-column-id=&quot;rbsCardObjectDrillDown&quot; data-column-type=&quot;value&quot;&gt;&lt;em class=&quot;fa rbs-obj-drill-down-icon&quot;&gt;&lt;/em&gt;&lt;/span&gt;&lt;span class=&quot;rbs-end-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-end-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-end-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-end-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-end-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;span class=&quot;rbs-end-text-node-marker&quot;&gt;&#160;&lt;/span&gt;&lt;/div&gt;" version="1" default="false" >
<props>
<smartPhone>true</smartPhone>
<tablet>true</tablet>
<desktop>false</desktop>
</props>
</a148>
</MobileCards>
Posted by Ranjana sinha on 16-Dec-2016 05:27

Hi Iram,

Could you please replace the a148 with MobileCard and then try to import. That should fix the issue.

Also let me know if this MobileCards is a part of DataObjectDef?

Regards,

Ranjana Sinha

Posted by IramK on 16-Dec-2016 05:48
Hello Ranjana,
 
Yes, MobileCards is a part of DataObjectDef. Thanks for providing a resolution to fix that issue with the import. I can confirm that replacing a148 with MobileCard works and I am able to import my cards into the beta environment.
 
Cheers,
Iram
 
This thread is closed