How to have media picker property generate a thumbnail and display on webpage when user selects an image
Hi Everyone
Firstly, sorry if i have posted in the wrong section.
I am new to Umbraco and at present really like using it and haven't had problems so far! I've been wrecking my brain all day trying to figure out how to display a thumbnail of the image that a user selects from the tab section of the content.
e.g. I have made a new tab named 'testimonials' on my home page in that tab i have added 2 properties 'testimonialBody' which is the content and i have that at a 200 character limit. my 2nd property is the media picker so the user can upload an image to go with the testimonial. However rather than it display the whole image i want it to produce a thumbnail of it and feed it out with the text. I have the text displaying fine but just don't know where to start with generating the thumbnail on upload.
I've read up and i can't seem to find any help on this. I haven't worked with ASP in about 4 years so i'm not so fresh and still getting used to the xslt and macro's etc.
If I understand correctly, you're just talking about the back office - not frontend rendering, right?
For the back office you have two main choices:
* Use an "Upload" field, which will save the uploaded image and store the URL - additionally, it will save a thumbnail and show that on the document.
* Use a "Media Picker" field, which by default only lets you pick an already uploaded image (so you'd have to have created an Image in the Media section and uploaded etc.). It only stores the ID of the Media item on the property and it doesn't show a thumbnail...
You can, however, modify the Media Picker datatype (or create a new one) to show a thumbnail and to allow simultaneous uploading and creating of a new Media item so you can do everything in the same dialog.
Let me know if you need more help (or if you were really asking how to show the image etc. in the front end).
Thank you for your response. I actually meant to upload and show the thumbnail of the uploaded image on the front end. I actually got this to work using code i found from someone trying to achieve random images using imagegen to resize which is working well for me. However it only works using a folder as the selected image rather than one image itself.
I figured if i could change the part of the code to use the single image rather than folder i would have achieved my goal.
Here is the xslt of what i got. I would like it to select a single image rather than only recognize an image folder to use. I know this is because the code is displaying the images from the folder randomly.
<msxsl:script language="c#" implements-prefix="randomTools"> <msxsl:assembly href="../bin/umbraco.dll"/> <![CDATA[ /// <summary> /// Gets a random integer that falls between the specified limits /// </summary> /// <param name="lowerLimit">An integer that defines the lower-boundary of the range</param> /// <param name="upperLimit">An integer that defines the upper-boundary of the range</param> /// <returns>A random integer within the specified range</returns> public static int GetRandom(int lowerLimit,int upperLimit) { Random r = umbraco.library.GetRandom(); int returnedNumber = 0; lock (r) { returnedNumber = r.Next(lowerLimit, upperLimit); } return returnedNumber; } ]]> </msxsl:script>
That worked perfect! thank you so much! would this work if i changed my property to upload rather than mediapicker? just for client ease of use when they upload images?
Would there be any reason for this error coming up when i go to upload the image.. this i recall has only happened after i've published the site to my web hosting server...the only thing changed in the web.config file was the CustomError mode from 'RemoteOnly' to 'Off' . At present my hosting providers are working on getting the site running i think they're having ASP compatibility issues (but thats a different issue)
Could not find a part of the path '\\vmware-host\Shared Folders\Documents\My Web Sites\Parkside\media\2402\Chrysanthemum.jpg'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path '\\vmware-host\Shared Folders\Documents\My Web Sites\Parkside\media\2402\Chrysanthemum.jpg'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I managed to solve the errors i was having when i uploaded my website onto my vidahost server.
I was still getting that error when i tried to use upload but for now i've changed it to mediapicker as this works fine.
The problems i was having were to do with database in web.config but i figured this myself and managed to get the site up.
Anyway after that the problem i was having was with permissions on my xslt folder it would not upload the xslt files, my provider changed the permissions and i managed to upload the files. but now i have a seperate issue...when i view the website it says Error parsing xslt file ...
for all of my xslt's now i've read the various forum posts on the bin folder and deleting old dll's but unfortunately i'm not up to scratch on knowing what should and shouldn't be in there just yet.
I tried taking away .dll that i knew were of old stuff which was very few. but still getting the error even after recyling my app pool. when i try to save the xslt in the back end over vidahost server it gets this error...
Error occured
System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.macro.GetXsltExtensionsImpl() at umbraco.macro.b__0() at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) at umbraco.macro.GetXsltExtensions() at umbraco.macro.AddMacroXsltExtensions() at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I'm at a loss as i don't know what else to try and can't seem to find any info about it not related to upgrades as i have encountered these errors on uploading to vidahost. Everything works fine locally apart from the upload feature.
Any advice would be much appreciated as i'm currently losing my mind! haha
I installed the FALM housekeeping to see what it was logging. This is the only error i get when republishing or trying to save .xslt files .
System.IO.DirectoryNotFoundException: Could not find a part of the path '\\pdc2\sites\a\adcwindowsserver.co.uk\public_html\PDC2\sites\a\adcwindowsserver.co.uk\public_html\config\feedProxy.config'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) at System.Threading.CompressedStack.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) at System.Xml.XmlTextReaderImpl.OpenUrl() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at umbraco.xmlHelper.OpenAsXmlDocument(String filePath) at dashboardUtilities.FeedProxy.Page_Load(Object sender, EventArgs e)
the feedProxy.config file is in the config folder so it isn't missing.
I have ran the umbdebugtrace and this is what it says for each xslt it is trying to render.
umbracoMacro InnerException
Unable to load one or more of the types in assembly 'uComponents.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown: System.IO.FileLoadException: Could not load file or assembly 'Lucene.Net, Version=2.9.2.2, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Unable to load one or more of the types in assembly 'uComponents.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown: System.IO.FileLoadException: Could not load file or assembly 'Lucene.Net, Version=2.9.2.2, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.macro.GetXsltExtensionsImpl() at umbraco.macro.<GetXsltExtensions>b__0() at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) at umbraco.macro.GetXsltExtensions() at umbraco.macro.AddMacroXsltExtensions() at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
Sorry...going back to the upload data type and media section ..I've posted in bugs forum but it isn't appearing...so I'll post here in hope of you seeing it.
Hi
I have my first umbraco site running on local server and published on vidahost. I'm sure at the beginning i was able to upload images to the media folder but now I cannot upload through my local server or my hosting server, i get the following error:
Server Error in '/' Application.
Could not find a part of the path '\\PDC2\sites\a\adcwindowsserver.co.uk\public_html\media\2463\pinterest-back.png'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path '\\PDC2\sites\a\adcwindowsserver.co.uk\public_html\media\2463\pinterest-back.png'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I'm unsure why it is trying to find the image when i'm uploading it, i also have done the permission check and it says my permissions are perfect. media uploads fine through the desktop media uploader but i don't want this to be the only way for the client to upload images. I don't know what else to try as everything is now working great apart from this after a couple of permission issues and missing bits in the config files.
I have the FALM Housekeeping installed and it keeps on bringing this error.. don't know if it related and don't know how to fix this
System.IO.DirectoryNotFoundException: Could not find a part of the path '\\pdc2\sites\a\adcwindowsserver.co.uk\public_html\PDC2\sites\a\adcwindowsserver.co.uk\public_html\config\feedProxy.config'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) at System.Threading.CompressedStack.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) at System.Xml.XmlTextReaderImpl.OpenUrl() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at umbraco.xmlHelper.OpenAsXmlDocument(String filePath) at dashboardUtilities.FeedProxy.Page_Load(Object sender, EventArgs e)
I am also curious as to why it is trying to navigate to PDC2? that folder automatically created itself with media folder and the folder files of the images i've been trying to upload, but it has been trying to find feedProxy.config in there? I would really appreciate if someone could help on this! i'm at a loss!
I am *not* a .NET/C# guy at all, but what I think is happening is this:
When using Umbraco or Desktop Media Uploader to upload the images, the thread/process/whatever-it's-called runs as the user that has all the right permissions for doing stuff like that, e.g. saving images etc.
When uploading from the frontend, the process runs as another user, which doesn't have all the permisisons needed, it seems...
Does that make sense? Are you uploading those images from the frontend of your website?
No i am trying to upload images through the media section on the back end like normal and get that error. I get the same error trying to upload via the upload data type also in the back end under a content tab i created.
I'm not overly sure on the permissions etc and how to change them and my hosting provider isn't being that helpful in explaining what he's doing and what he has to change and also hasn't worked with umbraco set up so can't provide me with much else.
The upload via media section on back end used to work fine over local server but now it doesn't upload on my local server either. I don't know whether anything has changed in the web.config or i have to declare anything.
Is there a forum i could post this into to get a quick response, it wasn't posting into the bug section last week.
How to have media picker property generate a thumbnail and display on webpage when user selects an image
Hi Everyone
Firstly, sorry if i have posted in the wrong section.
I am new to Umbraco and at present really like using it and haven't had problems so far! I've been wrecking my brain all day trying to figure out how to display a thumbnail of the image that a user selects from the tab section of the content.
e.g. I have made a new tab named 'testimonials' on my home page in that tab i have added 2 properties 'testimonialBody' which is the content and i have that at a 200 character limit. my 2nd property is the media picker so the user can upload an image to go with the testimonial. However rather than it display the whole image i want it to produce a thumbnail of it and feed it out with the text. I have the text displaying fine but just don't know where to start with generating the thumbnail on upload.
I've read up and i can't seem to find any help on this. I haven't worked with ASP in about 4 years so i'm not so fresh and still getting used to the xslt and macro's etc.
Any guidance would be greatly appreciated! Thanks
Hi Hannah - welcome to Umbraco!
If I understand correctly, you're just talking about the back office - not frontend rendering, right?
For the back office you have two main choices:
* Use an "Upload" field, which will save the uploaded image and store the URL - additionally, it will save a thumbnail and show that on the document.
* Use a "Media Picker" field, which by default only lets you pick an already uploaded image (so you'd have to have created an Image in the Media section and uploaded etc.). It only stores the ID of the Media item on the property and it doesn't show a thumbnail...
You can, however, modify the Media Picker datatype (or create a new one) to show a thumbnail and to allow simultaneous uploading and creating of a new Media item so you can do everything in the same dialog.
Let me know if you need more help (or if you were really asking how to show the image etc. in the front end).
/Chriztian
Hi Chriztian
Thank you for your response. I actually meant to upload and show the thumbnail of the uploaded image on the front end. I actually got this to work using code i found from someone trying to achieve random images using imagegen to resize which is working well for me. However it only works using a folder as the selected image rather than one image itself.
I figured if i could change the part of the code to use the single image rather than folder i would have achieved my goal.
Here is the xslt of what i got. I would like it to select a single image rather than only recognize an image folder to use. I know this is because the code is displaying the images from the folder randomly.
Hope i'm explaining this well enough.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
xmlns:randomTools="http://www.umbraco.org/randomTools"
exclude-result-prefixes="msxml umbraco.library msxsl randomTools">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="maxItems" select="number(1)" />
<xsl:template match="/">
<xsl:param name="imgFolder" select="$currentPage/boxImage3" />
<xsl:if test="$imgFolder!=''">
<xsl:for-each select="umbraco.library:GetMedia($imgFolder, 'false')/Image">
<xsl:sort select="randomTools:GetRandom(0,count(umbraco.library:GetMedia($imgFolder, 'false')/Image))" order="ascending" />
<xsl:if test="position() <= $maxItems">
<a rel="lightbox">
<xsl:attribute name="href">
<xsl:text>/ImageGen.ashx?image=</xsl:text>
<xsl:value-of select="umbracoFile"/>
<xsl:text>&width=640</xsl:text>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="@nodeName" />
</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:text>/ImageGen.ashx?image=</xsl:text>
<xsl:value-of select="umbracoFile" />
<xsl:text>&width=100</xsl:text>
<xsl:text>&height=100</xsl:text>
</xsl:attribute>
</img>
</a>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:template>
<msxsl:script language="c#" implements-prefix="randomTools">
<msxsl:assembly href="../bin/umbraco.dll"/>
<![CDATA[
/// <summary>
/// Gets a random integer that falls between the specified limits
/// </summary>
/// <param name="lowerLimit">An integer that defines the lower-boundary of the range</param>
/// <param name="upperLimit">An integer that defines the upper-boundary of the range</param>
/// <returns>A random integer within the specified range</returns>
public static int GetRandom(int lowerLimit,int upperLimit) {
Random r = umbraco.library.GetRandom();
int returnedNumber = 0;
lock (r)
{
returnedNumber = r.Next(lowerLimit, upperLimit);
}
return returnedNumber;
}
]]>
</msxsl:script>
</xsl:stylesheet>
Thanks!
Ah - makes sense :-)
Here's a much simpler way to do just that:
/Chriztian
That worked perfect! thank you so much! would this work if i changed my property to upload rather than mediapicker? just for client ease of use when they upload images?
Thanks again!
Hi Hannah,
If you change to an upload field you don't need all the GetMedia() stuff - then you would basically do this instead:
Note that when you do this - you don't really have anything to put into the "title" attribute, since the only data stored for the image is the path...
/Chriztian
Thank you!
Would there be any reason for this error coming up when i go to upload the image.. this i recall has only happened after i've published the site to my web hosting server...the only thing changed in the web.config file was the CustomError mode from 'RemoteOnly' to 'Off' . At present my hosting providers are working on getting the site running i think they're having ASP compatibility issues (but thats a different issue)
Could not find a part of the path '\\vmware-host\Shared Folders\Documents\My Web Sites\Parkside\media\2402\Chrysanthemum.jpg'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path '\\vmware-host\Shared Folders\Documents\My Web Sites\Parkside\media\2402\Chrysanthemum.jpg'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
P.s. I am still working on my local remote server to upload the images not from my hosting server.
Thanks
Hi Hannah,
Just checking in with you - are you still having problems or was it an intermittent server issue?
The error is a little cryptic to me - but it reeks "permissions" if I should have any guessing as to what could cause it...
/Chriztian
Hi Chriztian
I managed to solve the errors i was having when i uploaded my website onto my vidahost server.
I was still getting that error when i tried to use upload but for now i've changed it to mediapicker as this works fine.
The problems i was having were to do with database in web.config but i figured this myself and managed to get the site up.
Anyway after that the problem i was having was with permissions on my xslt folder it would not upload the xslt files, my provider changed the permissions and i managed to upload the files. but now i have a seperate issue...when i view the website it says Error parsing xslt file ...
Error parsing XSLT file: \xslt\box1.xslt Error parsing XSLT file: \xslt\link1.xslt
for all of my xslt's now i've read the various forum posts on the bin folder and deleting old dll's but unfortunately i'm not up to scratch on knowing what should and shouldn't be in there just yet.
I tried taking away .dll that i knew were of old stuff which was very few. but still getting the error even after recyling my app pool. when i try to save the xslt in the back end over vidahost server it gets this error...
Error occured
System.NullReferenceException: Object reference not set to an instance of an object.
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.b__0()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I'm at a loss as i don't know what else to try and can't seem to find any info about it not related to upgrades as i have encountered these errors on uploading to vidahost. Everything works fine locally apart from the upload feature.
Any advice would be much appreciated as i'm currently losing my mind! haha
Thanks again!
I installed the FALM housekeeping to see what it was logging. This is the only error i get when republishing or trying to save .xslt files .
System.IO.DirectoryNotFoundException: Could not find a part of the path '\\pdc2\sites\a\adcwindowsserver.co.uk\public_html\PDC2\sites\a\adcwindowsserver.co.uk\public_html\config\feedProxy.config'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) at System.Threading.CompressedStack.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) at System.Xml.XmlTextReaderImpl.OpenUrl() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at umbraco.xmlHelper.OpenAsXmlDocument(String filePath) at dashboardUtilities.FeedProxy.Page_Load(Object sender, EventArgs e)
the feedProxy.config file is in the config folder so it isn't missing.
I have ran the umbdebugtrace and this is what it says for each xslt it is trying to render.
System.IO.FileLoadException: Could not load file or assembly 'Lucene.Net, Version=2.9.2.2, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Unable to load one or more of the types in assembly 'uComponents.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly 'Lucene.Net, Version=2.9.2.2, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.<GetXsltExtensions>b__0()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
I fixed it! I needed to declare the uComponent.core in xsltextensions.config woohooo!
Sorry...going back to the upload data type and media section ..I've posted in bugs forum but it isn't appearing...so I'll post here in hope of you seeing it.
Hi
I have my first umbraco site running on local server and published on vidahost. I'm sure at the beginning i was able to upload images to the media folder but now I cannot upload through my local server or my hosting server, i get the following error:
Server Error in '/' Application.
Could not find a part of the path '\\PDC2\sites\a\adcwindowsserver.co.uk\public_html\media\2463\pinterest-back.png'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path '\\PDC2\sites\a\adcwindowsserver.co.uk\public_html\media\2463\pinterest-back.png'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
I'm unsure why it is trying to find the image when i'm uploading it, i also have done the permission check and it says my permissions are perfect. media uploads fine through the desktop media uploader but i don't want this to be the only way for the client to upload images. I don't know what else to try as everything is now working great apart from this after a couple of permission issues and missing bits in the config files.
I have the FALM Housekeeping installed and it keeps on bringing this error.. don't know if it related and don't know how to fix this
System.IO.DirectoryNotFoundException: Could not find a part of the path '\\pdc2\sites\a\adcwindowsserver.co.uk\public_html\PDC2\sites\a\adcwindowsserver.co.uk\public_html\config\feedProxy.config'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) at System.Threading.CompressedStack.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) at System.Xml.XmlTextReaderImpl.OpenUrl() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at umbraco.xmlHelper.OpenAsXmlDocument(String filePath) at dashboardUtilities.FeedProxy.Page_Load(Object sender, EventArgs e)
I am also curious as to why it is trying to navigate to PDC2? that folder automatically created itself with media folder and the folder files of the images i've been trying to upload, but it has been trying to find feedProxy.config in there? I would really appreciate if someone could help on this! i'm at a loss!
Thanks
Umbraco Version : 4.8
ASP.NET Version: 4
Windows 7 Ultimate 32-bit VM Ware over Mac
IIS Version : 7
Hi Hannah,
I am *not* a .NET/C# guy at all, but what I think is happening is this:
When using Umbraco or Desktop Media Uploader to upload the images, the thread/process/whatever-it's-called runs as the user that has all the right permissions for doing stuff like that, e.g. saving images etc.
When uploading from the frontend, the process runs as another user, which doesn't have all the permisisons needed, it seems...
Does that make sense? Are you uploading those images from the frontend of your website?
/Chriztian
HI Chriztian,
Thank you for getting back to me.
No i am trying to upload images through the media section on the back end like normal and get that error. I get the same error trying to upload via the upload data type also in the back end under a content tab i created.
I'm not overly sure on the permissions etc and how to change them and my hosting provider isn't being that helpful in explaining what he's doing and what he has to change and also hasn't worked with umbraco set up so can't provide me with much else.
The upload via media section on back end used to work fine over local server but now it doesn't upload on my local server either. I don't know whether anything has changed in the web.config or i have to declare anything.
Is there a forum i could post this into to get a quick response, it wasn't posting into the bug section last week.
I really appreciate your help and advice!
Thanks Hannah
is working on a reply...