Blogengine.net Newsletter and contact don't work

May 17, 2012 at 1:45 PM
Hi Andy

i have need of your help....

i have problem with newsletter ... in setting my smtp email work with success...

when i send new email in newsletter i go in file Newsletter.xml (in App_data) and i see that it's empty...

do you know the solution?

can you help me?

the same problem i have with contact.aspx when i fill the fields dont happen nothing

thanksss

Bye

Fabry
May 17, 2012 at 6:36 PM

Hi Fabry, 

Hope you have a backup of the newsletter.xml that you can use to replace that empty file.

Have you been tinkering with your site recently, changes to the main navigation for example?

There's a JavaScript error pointing to ddsmoothmenu

$mainmenu.parent().get(0) is undefined in ddsmoothmenu.js Line: 49

I turned off JavaScript and sent you a message from your contact form, it seemed to send but the confirmation message revealed errors.

XML Parsing Error: no element found. Location: http://www.yoursite.it/BlogEngine/contact.aspx Line Number 1, Column 1:^

You might want to sort that JavaScript error and take it from there.

May 20, 2012 at 6:55 PM

Andy now when i fill fields of COntact.aspx and press Send i have in new page this error

Errore interpretazione XML: nessun elemento trovato
Indirizzo: http://www.informarea.it/BlogEngine/contact.aspx
Linea numero 1, colonna 1:

what means?
can you help me?
thanks
Fabry


From: [email removed]
To: [email removed]
Date: Thu, 17 May 2012 10:36:59 -0700
Subject: Re: Blogengine.net Newsletter and contact don't work [blogengine:356145]

From: Andy_McKay
Hi Fabry,
Hope you have a backup of the newsletter.xml that you can use to replace that empty file.
Have you been tinkering with your site recently, changes to the main navigation for example?
There's a JavaScript error pointing to ddsmoothmenu
$mainmenu.parent().get(0) is undefined in ddsmoothmenu.js Line: 49
I turned off JavaScript and sent you a message from your contact form, it seemed to send but the confirmation message revealed errors.
XML Parsing Error: no element found. Location: http://www.yoursite.it/BlogEngine/contact.aspx Line Number 1, Column 1:^
You might want to sort that JavaScript error and take it from there.
Read the full discussion online.
To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)
To start a new discussion for this project, email blogengine@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
May 20, 2012 at 9:52 PM

Hi Fabry, short answer would be don't know what's causing it.

Can you test your site locally and if so, what happens there?

Also, do you have any error logging in place, ELMAH for example?

After a quick search it appears that the error you are seeing is Firefox's response to an empty page being served up.

There appears to be a variety of causes:

http://stackoverflow.com/questions/5404342/asp-net-xml-parsing-error-no-element-found-line-number-1-column-1-error

http://kruegerwebdesign.com/blog/?p=4

http://stackoverflow.com/questions/6193297/xml-parsing-error-no-element-found-location-http-localhost8000-web-config-l

http://www.sitefinity.com/devnet/forums/sitefinity-3-x/set-up-installation/xml-parsing-error-no-element-found.aspx

Maybe others in the BE forum have come across this before?

Coordinator
May 21, 2012 at 10:14 AM

In the BE control panel, Settings, Advanced Settings is an option to "Enable Error Logging".  If that's not already checked, then check that and Save.  Then try filling out the Contact page again, and after it doesn't work, check the App_Data folder to see if there's a "logger.txt" file.  If so, it may contain some details on the error.

Coordinator
May 21, 2012 at 10:58 AM

Regarding the Newsletter widget, it looks like you are using the AllTuts theme which is one of the Razor based themes.  Unfortunately, the Newsletter widget does not work with the Razor based themes.

For the problem with the Contact page, in case you haven't seen it yet, see my post above for trying to get error details.

May 21, 2012 at 1:42 PM

I know that the newsletter widget don't work, but contact page should work...

i have saw that file logger.txt i don't have nothing reference at error of contact page....

i have tested Contact page in firefox and i have this error "XML Parsing Error: no element found" , in IE 9 when i click button Send don't happen nothing...

i don't know why...

i know only that i have 1 error js with lightbox when i load my site " Errore: L'oggetto non supporta la proprietà o il metodo 'lightBox'  error is in line underline

<script type="text/javascript">
        $(function () {
            $('a.lightbox').lightBox();
            $('a[rel*=lightbox]').lightBox();
 
            ddsmoothmenu.init({
                mainmenuid: "smoothmenu1",
                orientation: 'h',
                classname: 'ddsmoothmenu',
                contentsource: "markup"
            });
        });
    </script>

very very strange...

Coordinator
May 21, 2012 at 3:05 PM

There's a couple of issues here.  The main issue related to the JavaScript error is because the jQuery script is in your page 3 times (it only needs to be there once).  One of the jQuery script references is after the Lightbox script loads which wipes out Lightbox when the new jQuery object is re-created (for a 3rd time).  The 3 script references in your HTML look like this:

<script type="text/javascript" src="/BlogEngine/js.axd?path=%2fBlogEngine%2fScripts%2fjquery.js"></script>
<script type="text/javascript" src="/BlogEngine/themes/AllTuts/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/BlogEngine/themes/AllTuts/js/jquery.min.js"></script>

The first one is probably automatically injected, so I would leave that.  The other 2 are probably in in the site.cshtml file of the AllTuts theme.  I would remove those bottom two.

.... back to the Contact page error.  If you haven't yet, two changes I would try making to the web.config file are.

#1, Change the <customErrors> tag so the mode is Off (case sensitive), as in:
<customErrors mode="Off">

#2, Change the debug attribute on the <compilation> tag to true, as in:
<compilation debug="true" targetFramework="4.0">

These two changes might make it so some error details are revealed in the response from the server.  You might need to monitor the response coming back from the server via Fiddler or Firebug, if you are not doing so already.

May 23, 2012 at 4:43 PM
Thank you Ben
i will try this evening....
Fabry




From: [email removed]
To: [email removed]
Date: Mon, 21 May 2012 07:06:00 -0700
Subject: Re: Blogengine.net Newsletter and contact don't work [blogengine:356145]

From: BenAmada
There's a couple of issues here. The main issue related to the JavaScript error is because the jQuery script is in your page 3 times (it only needs to be there once). One of the jQuery script references is after the Lightbox script loads which wipes out Lightbox when the new jQuery object is re-created (for a 3rd time). The 3 script references in your HTML look like this:



The first one is probably automatically injected, so I would leave that. The other 2 are probably in in the site.cshtml file of the AllTuts theme. I would remove those bottom two.
.... back to the Contact page error. If you haven't yet, two changes I would try making to the web.config file are.
#1, Change the <customErrors> tag so the mode is Off (case sensitive), as in:
<customErrors mode="Off">
#2, Change the debug attribute on the <compilation> tag to true, as in:
<compilation debug="true" targetFramework="4.0">
These two changes might make it so some error details are revealed in the response from the server. You might need to monitor the response coming back from the server via Fiddler or Firebug, if you are not doing so already.
Read the full discussion online.
To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)
To start a new discussion for this project, email blogengine@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
May 23, 2012 at 8:17 PM
Hi Ben
i had made that you had me wrote.... now i after send button in contact page i receive this script error in propriety lengh

: Impossibile ottenere il valore della proprietà 'length': oggetto nullo o non definito

if ($('ctl00_cphBody_txtAttachment') && $('ctl00_cphBody_txtAttachment').value.length > 0)

it's normal??? what i must to do?
thankss
fabry



From: [email removed]
To: [email removed]
Date: Mon, 21 May 2012 07:06:00 -0700
Subject: Re: Blogengine.net Newsletter and contact don't work [blogengine:356145]

From: BenAmada
There's a couple of issues here. The main issue related to the JavaScript error is because the jQuery script is in your page 3 times (it only needs to be there once). One of the jQuery script references is after the Lightbox script loads which wipes out Lightbox when the new jQuery object is re-created (for a 3rd time). The 3 script references in your HTML look like this:



The first one is probably automatically injected, so I would leave that. The other 2 are probably in in the site.cshtml file of the AllTuts theme. I would remove those bottom two.
.... back to the Contact page error. If you haven't yet, two changes I would try making to the web.config file are.
#1, Change the <customErrors> tag so the mode is Off (case sensitive), as in:
<customErrors mode="Off">
#2, Change the debug attribute on the <compilation> tag to true, as in:
<compilation debug="true" targetFramework="4.0">
These two changes might make it so some error details are revealed in the response from the server. You might need to monitor the response coming back from the server via Fiddler or Firebug, if you are not doing so already.
Read the full discussion online.
To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)
To start a new discussion for this project, email blogengine@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Coordinator
May 24, 2012 at 8:07 AM

I'm not getting an error on that line of JavaScript:
if ($('ctl00_cphBody_txtAttachment') && $('ctl00_cphBody_txtAttachment').value.length > 0)

Actually, did you update the JavaScript?  Because, what I see in the HTML source is:
if (BlogEngine.$('ctl00_cphBody_txtAttachment') && BlogEngine.$('ctl00_cphBody_txtAttachment').value.length > 0)

I'm wondering if you changed it from $ to BlogEngine.$.  If so, what's there now is correct.

To verify, I'm testing on the following page -- is that the correct site?
http://www.informarea.it/BlogEngine/contact.aspx 

One thing you might want to try although it's probably not related is to disable Attachments on the Contact page (unless if you need them).  They can be disabled in the control panel.  Controls -> Common Controls (in the right sidebar), and towards the bottom, uncheck "Enable Attachments" in the Contact Form section.

Btw, did you make those 2 changes to the web.config file?  The customErrors update and compilation debug update?  If so, are those changes still on the site, or did you revert them back to their original values?  If I try to submit on the contact page now, I'm not getting any additional error details from the server ... which might be unavoidable.  I was hoping the server might return some error details after those changes.

Apr 1, 2013 at 7:27 PM
@benamada,

I'm setting up the Alltuts theme on the blog for our company and I ran into the same issue with the newsletter widget. It simply doesnt work. I switch themes and it works like a charm.

Are there any plans for a newsletter widget that is compatible with razor?