Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have an existing project, which use Slimsy and the extension method GetResponsiveImageUrl on IPublishedContent.
GetResponsiveImageUrl
I have cloned a new project on Umbraco Cloud running Umbraco 7.5.7 and the merged the stuff to the Umbraco Cloud project.
However in the partials, where it use GetResponsiveImageUrl is doesn't seem to recognize it.
The original partial:
The Umbraco Cloud project:
It works if I add @using Slimsy; to the file.
@using Slimsy;
/Bin folder contains both Slimsy.dll and Slimsy.dll. Furthermore web.config has the following:
Slimsy.dll
<httpModules> <add name="SlimResponseModule" type="Imazen.SlimResponse.SlimResponseModule, Imazen.SlimResponse" /> </httpModules>
and
<system.webServer> <modules runAllManagedModulesForAllRequests="true"> <add name="SlimResponseModule" type="Imazen.SlimResponse.SlimResponseModule, Imazen.SlimResponse" /> </modules> </system.webServer>
/Bjarne
Hi Bjarne,
The namespace must have been removed from the web.config within the Views folder.
The namespaces element should include:
<add namespace="Slimsy" />
Thanks,
Jeavon
Hi Jeavon
I thought about that too, but it does exists here in /Views/Web.config:
<system.web.webPages.razor> <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <pages pageBaseType="System.Web.Mvc.WebViewPage"> <namespaces> <add namespace="System.Web.Mvc"/> <add namespace="System.Web.Mvc.Ajax"/> <add namespace="System.Web.Mvc.Html"/> <add namespace="System.Web.Routing"/> <add namespace="Umbraco.Web"/> <add namespace="Umbraco.Core"/> <add namespace="Umbraco.Core.Models"/> <add namespace="Umbraco.Web.Mvc"/> <add namespace="umbraco"/> <add namespace="Examine"/> <add namespace="Umbraco.Web.PublishedContentModels"/> <add namespace="Slimsy"/> </namespaces> </pages> </system.web.webPages.razor>
The original project has been upgraded from Umbraco 7.4.1 to 7.5.7 .. where it works.
Then I have cloned a new clean project from Umbraco Cloud and merged the stuff to the cloud project.
I have compared the files in both projects and can't find any difference regarding Slimsy.
Could it somehow conflict with Courier?
Hmm, now it seems to work.
I think it was because I touched the ~/Views/Web.config file or restarted Visual Studio.
~/Views/Web.config
Strange, not unless something in Umbraco Cloud is reverting that change to /Views/Web.config.
You could try adding it to the main Web.Config but this relates to the Views, so that specific Web.Config is the right place for it.
I'm assuming it doesn't work on your local dev machine as well as on Umbraco Cloud?
I doesn't work on my local machine now.
I guess the razor/view engine somehow didn't see the changed merged, which maybe first happened after I touched the Web.config i Views folder or restarted VS.
Sounds like a issue with your ASP.NET Temp files not getting updated correctly.
Remove everything from
%AppData%\Local\Temp\Temporary ASP.NET Files
and/or
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Extension method GetResponsiveImageUrl is not found
I have an existing project, which use Slimsy and the extension method
GetResponsiveImageUrl
on IPublishedContent.I have cloned a new project on Umbraco Cloud running Umbraco 7.5.7 and the merged the stuff to the Umbraco Cloud project.
However in the partials, where it use GetResponsiveImageUrl is doesn't seem to recognize it.
The original partial:
The Umbraco Cloud project:
It works if I add
@using Slimsy;
to the file./Bin folder contains both
Slimsy.dll
andSlimsy.dll
. Furthermore web.config has the following:and
/Bjarne
Hi Bjarne,
The namespace must have been removed from the web.config within the Views folder.
The namespaces element should include:
Thanks,
Jeavon
Hi Jeavon
I thought about that too, but it does exists here in /Views/Web.config:
The original project has been upgraded from Umbraco 7.4.1 to 7.5.7 .. where it works.
Then I have cloned a new clean project from Umbraco Cloud and merged the stuff to the cloud project.
I have compared the files in both projects and can't find any difference regarding Slimsy.
Could it somehow conflict with Courier?
/Bjarne
Hmm, now it seems to work.
I think it was because I touched the
~/Views/Web.config
file or restarted Visual Studio./Bjarne
Strange, not unless something in Umbraco Cloud is reverting that change to /Views/Web.config.
You could try adding it to the main Web.Config but this relates to the Views, so that specific Web.Config is the right place for it.
I'm assuming it doesn't work on your local dev machine as well as on Umbraco Cloud?
I doesn't work on my local machine now.
I guess the razor/view engine somehow didn't see the changed merged, which maybe first happened after I touched the Web.config i Views folder or restarted VS.
Sounds like a issue with your ASP.NET Temp files not getting updated correctly.
Remove everything from
and/or
is working on a reply...