Wednesday, November 18, 2015

Sitecore 8 - Document Manager is blank in Rich Text Editor

Environment: Sitecore 8.0 rev 150621

Sitecore Rich Text Editor allows to link a document to a link. So the idea is to download the linked document when the particular link is clicked.
To link the document you have to use the Sitecore Rich Text Editor (RTE). But when you trying to link the document using the Document Manager in the Sitecore RTE it is blank as bellow.



I have raised a Sitecore support ticket and this issue reported as a bug in Sitecore.

They have provided the following workaround to overcome this issue.

1. Open the /Website/sitecore/shell/Controls/Rich Text Editor/EditorPage.aspx file
2. Find the following text part and replace it:

MediaManager-ViewPaths="/media library"
TemplateManager-UploadPaths="/media library"

with this one:

MediaManager-ViewPaths="/media library"
DocumentManager-DeletePaths="/"
DocumentManager-ViewPaths="/"
TemplateManager-UploadPaths="/media library"

3. Clear browsers cache and try the issue again.
Let us know if you have any issue with the Document Manager.



Tuesday, November 17, 2015

SItecore 8 - Solve 'The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel' error

When I work with Sitecore, I build Sitecore link databases to avoid some errors causing in our environment. But after building the core, master and web database links using the Sitecore Launchpad --> Control Panel --> Rebuild link databases I got the following error when I try to log in to the Sitecore back-end.

The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type 'Sitecore.ExperienceAnalytics.Client.Mvc.Presentation.ExperienceAnalyticsLineChartViewModel'.

The reason for this issue is Sitecore does not clear the cache after it builds the link databases.
To solve this issue, do the following steps:
1. Login to the http://{your website}/sitecore/admin/cache.aspx
2. 'Clear all' cache.
3. Restart the website from IIS

But this a temporary solution.
I'm experience this issue time to time.
So when this error is throwing you have to redo the above steps.

Update

I created a Sitecore support ticket sine this error getting annoying and they provide a fix with some item changes. It include item changes in the core database.
If this problem arise in your environment I think it is better to raise a Sitecore support ticket with your databases.

Until Sitecore support come with a solution...

Don't worry, you don't have to be blocked with this.
In my case this error came in the Sitecore launch pad. So I was able to bypass the launchpad when I log in to the Sitecore by using the http://{website name}/sitecore/shell url.











Thursday, November 12, 2015

Sitecore 8: GeoIp not picking City, Region and Country

Environment: Sitecore 8.0 rev 150621

When we are testing our site to get visitor details, GeoIp does not tack City, Region and Country details of UK visitors. But visits received from Sri Lanka get the City, Region and Country details.

The reason for this is our QA visit the site from our internal network (the same network which our website is hosted).
Sitecore GeoIp does not track the City, Region and Country visits for the users coming from the internal networks.

To check this you can use an IP changing tool like Hide My Ass or Freedom.

Wednesday, November 4, 2015

Sitecore - Delete current version from an Item using Workflow Action

Current Environment: Sitecore 7.2 rev 140526

Requirement:
  • Need to remove the selected language from the item.
  • Need to remove it using the Sitecore Workflow Action 

Sitecore Step 1: Create a workflow action within the workflow which is set to that item template.

Create a workflow. (I used the default sample workflow).
You can find how to create the workflow action in sitecore cookbook: http://sdn.sitecore.net/upload/sitecore6/workflow_cookbook_a4.pdf

Sitecore Step 2: Provide Type String

Select the created workflow action.
In the Type String field provide the following details.
namespace.class_name, dll_name 

Do the following code for the class (.dll)

Coding:

     public class DeveleVersion
    {
        public void Process(WorkflowPipelineArgs args)
        {
            Item item = args.DataItem;
            
            Database db = Sitecore.Context.ContentDatabase;

            if (db == null || item == null) return;
            if (item.Versions.Count <= 0) return;
            using (new Sitecore.SecurityModel.SecurityDisabler())
            {
                item.Versions.RemoveVersion();
            }
            args.AbortPipeline();
        }
    }





Tuesday, November 3, 2015

Sitecore 8: Unable to add Enroll in Engagement plan save action to a Sitecore WFFM form

Environment: Sitecore 8.0 rev 150621

Whn I was working on Sitecore WFFM (Web Forms For Marketers) forms and save actions I got the following issue.
When I try to add Enroll in Engagement plan save action I got a Sitecore error saying "This action cannot be added. Your configuration does not support it."


This is happening because of 'Disable Analytics for this Page' setting in the Sitecore WFFM.
You can check this setting on the Advanced section in your WFFM form Content.



You can disable this setting by clicking on the 'Attributes' link.
Then go to the Settings section. Remove the check on 'Disable analytics for this page' check box.


Try to add the 'Enroll in Engagement Plan' save action. It will be added to the form save action list without getting the above error message.


Monday, November 2, 2015

Sitecore 8 - Check Item's created and last updated days

Environment: Sitecore 8.0 rev 150621

Sometimes you need to check when is a specific Sitecore item has been created or edited.
You don't have to worry about these things because Sitecore save these for you.

You can view item's following details:
1. Item created date.
2. User who created that item.
3. Revision of the item.
4. Last updated date of the item.
5. User who did the last update to the item.

To view the above details follow the following steps:
1. Go to the item you want.
2. Go to the 'View' section in the ribbon and make sure the 'Standard fields' check box is selected. (See image bellow)


3. Scroll down in the item's content section until you find the 'Statistics' section. Expand this and you can view the details mentioned above.