Developer forum

Forum » Development » View NewsletterV3 log

View NewsletterV3 log

Martijn Bokhove
Reply
Hi

Is it possible to see a log from the NewsletterV3 module, in particular the errors with subscriptions?
Our customer says that not all the subscriptions are able to activate the newsletter subscription. After clicking the link in the e-mail, the error page for the newslettersubscription shows up.

All the tests we tried are succesfull, and we are not able to see what goes wrong sometimes.
If possible, we would like to see a kind of log where is shown what the exact error is.

Gr
Martijn

Replies

 
Vladimir
Reply
Hi Martin,
there is no logging in NewsletterV3 module.
But I think you should be able to view all unhandled error in application Event Viewer:
  1. Right-click My Computer
  2. Manage
  3. Event Viewer
  4. Application
Best regards,
Vladimir
 
Martijn Bokhove
Reply

Hi Vladimir

I tried your suggestion, but there is no error to see in the Event Viewer.
The page redirects to the errorpage after clicking the confirmationlink, but I think there is no real error.
Personally I think there is a condition that makes DW disapprove the subscription.

In most cases this was the way the customers where subscribed:
- Customer goes to shop (offline, real physical shop)
- Customer fills in paper to get subscribed to the newsletter
- Shop fills in the information from the customer on the website and clicks send
- Customer recieves confirmation e-mail, clicks on link and gets the error page (filled in with the Newsletter Module, so no real error)

One of the reasons we thought that might be the problem is that the subscription adds an IP address to the temp table for subscriptions and the customer confirms the subscription from another IP address.
We tested this using the mobile phone to subscribe and our pc to confirm, so using 2 different IP addresses. This subscription was succesfull, so that wasn't the reason.

Could it be that there is a maximum time between the subscription on the website and clicking the confirmation in the e-mail?

Gr
Martijn 
 
Vladimir
Reply
Hi Martin,
no... time and IP address shouldn't affect this.

Do you have information what errorpage is appeared(404?) and an user name which got such error?
May you provide to me solution url and example of confirmation e-mail (any)?

Best regards,
Vladimir

 
Martijn Bokhove
Reply

Hi Vladimir

The errorpage is the page filled in the module, see attached screenshot.
Problem appears on http://www.cookandco.nl

The project doesn't run on the newest DW Core, we are planning to upgrade the project within a couple of weeks.

I have some examples from customers who were not able to registrate, I can send them to you. But the customers are not available anymore in the table NewsLetterV3TempRecipient, so that also could create the errorpage now.

Was hoping to see some kind of Log where is visible what went wrong. There are a few LogActions in the table (add recipient, add subscription, remove recipient, remove subscription, update subscription), maybe it's a good idea to add something like 'error subscription' to the LogActions.
In the code there must be a reason visible why the NewletterV3 module sends the customer to the 'error'page

Gr
Martijn
cac_newslettersettings.png
 
Vladimir
Reply
 Hi Martin,
I found two places in ConfirmChanges method where errorpage can appears: 

		Public Sub ConfirmChanges()
			Dim userId As Integer = Base.ChkNumber(Base.Request("recipientId"))
			Dim sessionId As String = Base.ChkString(Base.Request("key"))
			Dim tmpRec As New TempRecipient(userId, sessionId)
			Dim page As String = Dynamicweb.NewsLetterV3.Common.UrlRooted(_properties.Value("ConfirmPage"))
			Dim errorPage As String = Dynamicweb.NewsLetterV3.Common.UrlRooted(_properties.Value("ConfirmErrorPage"))

			If IsNothing(tmpRec.Recipient) Then
				HttpContext.Current.Response.Redirect(errorPage)
			End If

			Dim isnew As Boolean = tmpRec.Recipient.IsNew
			Dim unsubsciptionList As SubscriptionCollection = Nothing
			If Dynamicweb.NewsLetterV3.Common.IsUniqueMail(tmpRec.Recipient.ID, tmpRec.Recipient.AccessUserEmail) Then
				unsubsciptionList = GetUnsubscriptionList(tmpRec.Recipient)
				tmpRec.Recipient.Save(Consts.IP)
				TempRecipient.Delete(userId, sessionId)
			Else
				HttpContext.Current.Response.Redirect(errorPage)
			End If

			AdminNotify(tmpRec.Recipient, isnew, unsubsciptionList)

			HttpContext.Current.Response.Redirect(page)
		End Sub

1) If there is no record in  NewsLetterV3TempRecipient  table with TempRecipientRecipientID= userID AND TempRecipientSessionID=sessionID
2) If recipient with such email is already exists in AccessUser table

Also, records from NewsLetterV3TempRecipient table can be deleted only if all goes successfully. When recipient is saved a record is add in log table 'add recipient'

Hope, these clues will help to find source of problem...

Best regards,
Vladimir


 
Martijn Bokhove
Reply

Hi Vladimir

It looks like the NewsletterV3TempRecipientTable is cleaned up to prevent older records then 1 month. Most of the issues from our customer are now outdated, it makes it difficult to find the reason right now.

Thank you for adding the code that makes sense when the customer is redirected, I see if the e-mail is already in the AccessUser table then the TempRecipientRecipientID is replaced with the UserID.

First we will try the update to a newer core. After that we will subscribe some of customers wo were not able to confirm (and are not in the temptable anymore), and try to confirm the subscription with the SessionID in the URL.

Thanks for your support, I'll will post a new message if new issues with recent data are available (if necessary).

Gr
Martijn
 
Vladimir
Reply
 well, I hope this helps :) will be waiting for news....

Best regards,
Vladimir

 

You must be logged in to post in the forum