The Campaign tab shows up and I can create a new campaign.
What I don't understand is, what page gets rendered? Can I tell NewsletterStudio what template to use?
In the previous version I just added "Newsletter" to the "article.cshtml" for it to get used as the newsletter template. So it would be "articleNewsletter.cshtml".
I tried that but in the campaign list I get an error and I am not shure where to put my breakpoint:
This might be either because nothing is rendered or because there is some strange HTML on the front end that the HTML-inliner can't handle.
What happens if you create a template "articleNewsletter" and use that? (Also make sure that the template is created in the backoffice and listed in the "Templates"-list and that the document type article has this template configured as an allowed template.
I created a template "articleNews" in the backend. The template is listed in the Templates. I than added it to the allowed templates of the article document type.
The error remains the same.
I uninstalled NS and reinstalled V3.0.9 via nuget
In addition I installed NewsletterStudio.CssInline 1.0.0
Did not make any difference.
I added a docType Newsletter. When I create a Campaign from here it works. It finds the Newsletter.cshtml and renders it without any errors.
I think that the problem is that there was something in the HTML of the first template that the CssInliner could not handle. The error message indicates that it tries to inline the styles but something goes wrong.
The fact that it worked with a simple template just verifies this.
I would "start small", re-create the articleNewsletter.cshtml and start with the same content
<h1>Test</h1>
And then append more and more content while testing that the rendering works, after a while you'll probably find what property/content/element that breaks the CssInliner.
Sending from content section
Hi Markus,
I have set up the website so that newsletters can be send from the content section. Therefore I placed a line in the web.config as follows:
The Campaign tab shows up and I can create a new campaign. What I don't understand is, what page gets rendered? Can I tell NewsletterStudio what template to use?
In the previous version I just added "Newsletter" to the "article.cshtml" for it to get used as the newsletter template. So it would be "articleNewsletter.cshtml".
I tried that but in the campaign list I get an error and I am not shure where to put my breakpoint:
Can you help?
Thanks
Hi!
Looks like you've followed the steps outlined here?
https://www.newsletterstudio.org/documentation/package/3.0.0/develop/sending-from-content-section/
The new version works in the same way so if you postfix the template name with "Newsletter" we will pick that.
The screenshot is a bit small so I can't read the error message, do you mind posting some more details about the error you're seeing?
Thanks for getting back. It's the standard error message you get for a null reference. Don't know whether it helps much:
Hi!
This might be either because nothing is rendered or because there is some strange HTML on the front end that the HTML-inliner can't handle.
What happens if you create a template "articleNewsletter" and use that? (Also make sure that the template is created in the backoffice and listed in the "Templates"-list and that the document type article has this template configured as an allowed template.
Hi Markus,
I created a template "articleNews" in the backend. The template is listed in the Templates. I than added it to the allowed templates of the article document type.
The error remains the same.
I uninstalled NS and reinstalled V3.0.9 via nuget
In addition I installed NewsletterStudio.CssInline 1.0.0
Did not make any difference.
I added a docType Newsletter. When I create a Campaign from here it works. It finds the Newsletter.cshtml and renders it without any errors.
Don't know what I am missing...
Hi!
Did you call it "articleNews" or "articleNewsletter"? It has to be postfixed with "Newsletter".
When you tried with only "Newsletter.cshtml" did you have the exact same content as when you got the error message?
Hi,
sorry, it is called
articleNewsletter.cshtml
of course.To keep things simple I just used an h1 Tag in the Views:
This works fine with the
Newsletter.cshtml
Does case sensitivity matter?
Do I actually need the composer?
I have created a class in the Folder
Composers
callednewsletterStudioComposer.cs
with this in it:Just trying everything...
Hi!
I think that the problem is that there was something in the HTML of the first template that the CssInliner could not handle. The error message indicates that it tries to inline the styles but something goes wrong.
The fact that it worked with a simple template just verifies this.
I would "start small", re-create the articleNewsletter.cshtml and start with the same content
And then append more and more content while testing that the rendering works, after a while you'll probably find what property/content/element that breaks the CssInliner.
Do you understand how I mean?
is working on a reply...