0
votes

Whenever I select a message in ECM it redirects me to the login page of Sitecore with the following URL at the top

http://example.com/sitecore%20modules/shell/EmailCampaign/UI/Dialogs/MessageBody.aspx?message={79D6412B-824A-4349-8B94-9136D17C6E84}&lang=en&contact=Emailcampaign\exampleuser_at_example_dot_com

The following are the things I know about this issue:

  1. Though this happens most of the times, Sometimes it will work for the same message and for the same preview user (For the contact mentioned in the URL above).
  2. The sitecore user trying to access the message in ECM has all access rights for the message he is trying to access.
  3. I have a test environment running on a different server where this works fine. But in the production environment it is not working.
  4. I am running my site on Sitecore.NET 6.6.0 (rev. 121015) version.
  5. When the sitecore redirects me to the login page with the above URL at the top. I cannot login using that page. I have to go to

    http://example.com/sitecore/
    

    in order to log back in.

  6. The Item ID in the URL is correct and it points to the message that I am trying to view.

2
Does this work if you are an admin user? Do you have access to the master database in the production environment?Ian Graham
@goldengrahams I am an admin user and I have access to the master database. I can edit any other content that I want in content editor but I cannot view messagesSachin B. R.
What version of ECM are you using? If you have the SPEAK ECM Manager does this work?Ian Graham
@goldengrahams I have ECM 1.3.2 rev. 120307 and Speak 1.0.0 rev. 130527 installed on both production and test environment. I dont have Speak ECM manager since I am running my web site on SItecore 6.6 and it does not supports it.Sachin B. R.

2 Answers

1
votes

[Updated]

We resolved this issue by adding a custom preview handler in web.config like this

<previewManager defaultProvider="customPreview" enabled="true">
 <providers>
  <clear />
  <add name="default" type="Sitecore.Publishing.PreviewProvider, Sitecore.Kernel" />
  <add name="customPreview" type="PackageName.CustomPreview, PackageName" />
 </providers>
</previewManager>

Here is the code behind for that custompreview:

public class CustomPreview : Sitecore.Publishing.PreviewProvider
{
  public override void SetUserContext()
  {
    string shellUser = this.GetShellUser();
    if (!string.IsNullOrEmpty(shellUser))
        AuthenticationManager.SetActiveUser(shellUser);
    else
   {
        if(!Sitecore.Context.User.Name.Split('\\')[1].Equals("Anonymous"))
         AuthenticationManager.SetActiveUser(Sitecore.Context.User.Name);
   }
  }
}

[Old]

We resolved this issue. Strangely, this was related to badly configured load balancer. We still need to find what is going wrong in the load balancer but we don't face this issue when we remove one of the servers from the load balancer i.e., When the traffic goes only to one particular server, this issue doesn't occur. Since our test environment is deployed in only one server we never faced this issue there.

0
votes

This sounds like there is something missing in the core database.

I would check to make sure the roles that ECM requires are present in the core database and also check that you have the correct setup to facilitate users with the domain emailcampaign\username.

If this doesn't resolve the issue there is a diagnostic tool you can run here to help you debug further:

https://kb.sitecore.net/articles/553662

Failing that contact Sitecore support - they have more tools to help with debugging issues with ECM