Thursday, December 10, 2015

Sitecore EXM Message creation links are not responding

Sitecore version: 8.0 rev 150621
EXM version: 3.0 rev 150429

When I'm working with a Sitecore EXM module I experienced the email creation links are not working in the EXM. The links in the below image.



The reason for happening this is, some values and items required to EXM has been removed from the Core database.

1. To solve this problem, setup a vanilla installation of Sitecore using the SIM (Sitecore Instance Manager) tool. Read more about SIM from here.
2. Go to the instance's (website's) sitecore.
3. Change to Core database using the Sitecore Desktop.





4. Go to Content Editor --> Client --> Applications --> ECM --> Dialog Renderings 
Here is the place you can find the controls for dialog boxes links in the Sitecore EXM.

Find the following renderings:
a. OneTimeMessageRenderings
b. SubscriptionMessageRenderings
c. TriggeredMessageRenderings

5. Select each of them and do the following steps.

5.1. Go to 'Layout' section in the renderings item.

5.2. Go to View in the Sitecore ribbon and check 'Standard Fields' and 'Raw Values'.


5.3. The problem is with the 'Rendering' field.
Copy the 'Rendering' field value from your newly created Sitecore vanilla instance to this.

5.4. Do this for b and c also.

5.5. Save the changes.
When try to save there will be a warning message coming saying "The item "TriggeredMessageRenderings" contains broken links in these fields: - Renderings: "static" Do you want to save anyway?"



Ignore this message and click ok.

5.6. Go to EXM and test the links now. It should work.

CAUSE
The reason I assume for this problem is, I have remove the broken links in the Sitecore Core database using the removebrokenlinks.aspx which is provided by the Sitecore.
As you can see in the message, there are some broken links with these items.
So when I try to remove the broken links in the Core database using removebrokenlinks.aspx it removed these rendering values also.
So be careful when using the removebrokenlinks.aspx against the Core database.







Tuesday, December 1, 2015

Sitecore 8: Upgrade EXM 3.1 Update 1

In this blog post I'll explain how to upgrade the EXM to version 3.1 update 1.

Requirements:
1. Sitecore 8.0 rev. 150621 (Update-4) / Sitecore 8.0 rev. 150812 (Update-5).
2. Email Experience Manager 3.1.1 rev. 150811.update file.

You can download this from here. (You may require the permission to download this update).

1. Pre-Installation

1.1. Disable the following configuration files:
 Sitecore.EmailCampaign.config file.
 Sitecore.EmailCampaign.Speak.Server.Requests.config file.
 Sitecore.EmailCampaign.UI.config file.
 Sitecore.EmailCampaign.Dedicated.config file.
 Sitecore.EmailCampaign.Xtune.CD.config file.
 Sitecore.EmailCampaign.Xtune.Processing.config file.

1.2. Disable all scheduled tasks at the following locations:
 /sitecore/system/Tasks/Schedules/Email Campaign
 /sitecore/system/Modules/E-mail Campaign Manager/Tasks

NOTE: To disable the scheduled task, go to the task and clear the value in the 'Schedule' field in the item's Data section. (See image bellow)



1.3 Detached the Sitecore.EXM database (which is defined in the ecm.dispatch connection string)
NOTE: This is not available in Sitecore 7.5 and Sitecore 8.0. So if you are running on one of these versions you can skip this step.

1.4. If you are running on Sitecore 8.0 update 5 add the following configurations to your web.config file. (Else skip this step as well).

<dependentAssembly> 
   <assemblyIdentity name="MongoDB.Driver" publicKeyToken="f686731cfb9cc103" /> 
   <bindingRedirect oldVersion="0.0.0.0-1.8.3.9" newVersion="1.10.0.62" /> 
</dependentAssembly> 
<dependentAssembly> 
   <assemblyIdentity name="MongoDB.Bson" publicKeyToken="f686731cfb9cc103" /> 
   <bindingRedirect oldVersion="0.0.0.0-1.8.3.9" newVersion="1.10.0.62" /> 
</dependentAssembly>


2. Upgrade Installation

2.1. Go to the following URL.
http://<your_host_name>/sitecore/admin/UpdateInstallationWizard.aspx

2.2. Click 'Chose Package'



2.3. Select the package using the 'Brows' button. And continue by clicking on 'View package information'.


Then it will show you the package information.


Continue by clicking on 'Analyze and install the package'.

2.4. It is always better to analyse the package before install. Or you can directly click on Install.


If you select 'Analyze', it will show the details and click on 'Analysis results'.

This will show the problems with the analysis process. You need to look for red, blue and yellow signs.



2.5. Click on 'Install the package'.


2.6. You can check for the problems and if you feel ok you can close this page now.

3. Post-Installation 

After installing the update package, you should perform the following post-installation steps. Some of them can be already done for you. You just need to check every thing is ok.

3.1. Attach the Sitecore_Exm database to SQL server.
NOTE: You can find the file in the Data folder or, alternatively, in the Website\temp\ECM folder.

3.2. In the App_Config\ConnectionStrings.config file, add the SQL server connection string exm.dispatch
NOTE: Don't delete or overwrite the existing ecm.dispatch connection string because we need it to migrate the old data to the new database. (Migrate data from EXM monboDB to SQL database)

3.3. To migrate your existing email campaign data to SQL server, go to following URL.
http://<your_host_name>/sitecore/admin/MigrateCampaignData.aspx
If you don't have any data to migrate you can skip this step.

3.4. Now you can delete the old ecm.dispatch connection string in the /App_Config/ConnectionStrings.config file.

3.5. In the \App_Config\Include\EmailExperience\Sitecore.EmailExperience.Core.config file, replace the entire <ecmDataProvider defaultProvider="mongo"> section with the following section:

<ecmDataProvider defaultProvider="sql"> 
   <providers> 
      <clear/> 
         <add name="sql" type="Sitecore.Modules.EmailCampaign.Core.Data.SqlDbEcmDataProvider, Sitecore.EmailCampaign" connectionStringName="exm.dispatch"/> 
   </providers> 
</ecmDataProvider>

3.6. Remove the EXM httpHandler and handler sitecore_ecm_speak_request.ashx from the web.config file. (Simply delete the lines)

3.7. Remove the following files from all instances of EXM :
sitecore\shell\client\Applications\ECM\EmailCampaign.Client\Pipelines\UpdateMessagevariant\UpdateVariant.js
sitecore\shell\client\Applications\ECM\EmailCampaign.Client\Pipelines\UpdateMessagevariant

NOTE: Steps 3.5 and 3.7 might already done for you.

3.8. Your custom settings are not automatically ported to the new configuration file. If you have used any custom settings in the previous version and you want to apply them to EXM 3.1, make the necessary changes to the Sitecore.EmailExperience.ContentManagement.config file manually.

Ok, we are done with the installation.

4. Set the SMTP settings

In the Sitecore.EmailExperience.ContentManagement.config file set the smtp settings by changing the following configurations.

      <!-- SMTP server address (IP). -->
      <setting name="SMTP.Server" value="localhost" />

      <!-- Port number of the SMTP server. -->
      <setting name="SMTP.Port" value="25" />

      <!-- Domain for logging into SMTP server. -->
      <setting name="SMTP.LoginDomain" value="" />

      <!-- User name for logging into SMTP server. -->
      <setting name="SMTP.UserName" value="" />

      <!-- Password for access to SMTP server. -->
      <setting name="SMTP.Password" value="" />