Sitefinity “images” reserved name constraint

Posted by Community Admin on 04-Aug-2018 13:10

Sitefinity “images” reserved name constraint

All Replies

Posted by Community Admin on 16-Apr-2015 00:00

Hi there,

We are using Sitefinity 7.1.5.200.0 &
Personify 7.5.2 and this is our QA environment.

We are trying to configure
Personify-Sitefinity Connector to our solution. 

According to installation instructions we need to execute a code (step 2).



----------- documentation instructions Starts ------------

Sitefinity
“images” reserved name constraint

Sitefinity reserved name “images” for images loading handler.
Personify Web Controls use the same folder name for storing images and path to
this folder is provided in css files of default theme. Personify Web Controls
don’t show resources from “images” folder with default settings because
Sitefinity handler doesn’t load it. Please find more details here.

A
solution in order to change default Sitefinity reserved handler name is listed
below:

1.
Change default images folder name to any other in Sitefinity CMS Settings using
path
“~/Sitefinity/Administration/Settings/Advanced>Libraries>Images>UrlRoot>”

2. Move
all previously added images to the Sitefinity. Create temporary ASP.NET page on
web site with the following code behind and load it:

var imagesFacade = App.WorkWith().Images();

imagesFacade.ForEach( img =>
((IContentManager)imagesFacade.GetManager()).RecompileItemUrls(img);
).SaveChanges();

----------------- Documentation Ends
---------------------



We figured App.WorkWith() is using namespace using Telerik.Sitefinity; but
this page further asks forIContentManager interface is missing some assembly (attach
is a screenshot or error).

Wondering if you can help us trace/figure
out missing assembly, please.
Thanks,

-Ahsan

Posted by Community Admin on 16-Apr-2015 00:00

Hi there,

Please use these following to make the code run:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Telerik.Sitefinity;
using Telerik.Sitefinity.Modules.GenericContent;

public partial class ImageInit : System.Web.UI.Page

    protected void Page_Load(object sender, EventArgs e)
   
PersonifyMediaInit();
   

    protected void PersonifyMediaInit()
   
var imagesFacade = App.WorkWith().Images();
imagesFacade.ForEach(img => ((IContentManager)imagesFacade.GetManager()).RecompileItemUrls(img); ).SaveChanges();
   

 

It worked like a charm.

-Ahsan

 

 

 

This thread is closed