All Apps and Add-ons

Why am I unable to populate custom entries in the Newsletter app?

ragedsparrow
Contributor

Greetings,

I installed this app and I love the functionality that it provides. Everything works great with the sections that are prepopulated with the data gathered from the scripts, however when I try to input my own entries it's not working.

Example:

alt text

This is what I input, above. It correctly creates the entry in the table, however when I select it, it's not putting anything in the HTML or the preview:

alt text

Here is the message I get in debugger when I check the checkbox:

Uncaught TypeError: Cannot read property 'replace' of undefined
escapeHtmlEntities @ newsletter:1304
(anonymous function) @ newsletter:2071
dataChanged @ bundle.js:21246
(anonymous function) @ bundle.js:21229
1 Solution

ragedsparrow
Contributor

I think I found what my problem was:

So, it seems that when you try to use a custom entry, it is looking for a mydata[i].date column. It's not a valid column for the table, apparently.

On line 2071, I removed the following code in the XML:

 ' + escapeHtmlEntities(mydata[i].date) + '

Once I refreshed the page I was able to add custom entries to the page and they populated to the HTML

Edit:

I did a little more testing. It looks like it was originally a typo. I revised it to:

 ' + escapeHtmlEntities(mydata[i].description) + '

This seems to work the best.

View solution in original post

ragedsparrow
Contributor

I think I found what my problem was:

So, it seems that when you try to use a custom entry, it is looking for a mydata[i].date column. It's not a valid column for the table, apparently.

On line 2071, I removed the following code in the XML:

 ' + escapeHtmlEntities(mydata[i].date) + '

Once I refreshed the page I was able to add custom entries to the page and they populated to the HTML

Edit:

I did a little more testing. It looks like it was originally a typo. I revised it to:

 ' + escapeHtmlEntities(mydata[i].description) + '

This seems to work the best.

David
Splunk Employee
Splunk Employee

Fantastic! Thank you for finding and solving the problem! I will queue this fix for my next maintenance release, probably 1-2 weeks after .conf.

0 Karma

ragedsparrow
Contributor

I've tried this in IE11, Firefox, and Chrome.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...