Hi 2 all! There is one thing that is annoying me all the time in Umbraco. Media picker doesn't dispay image selected! Meet the new data type that extends standard Media Picker with preview function - "Media Picker with Preview"
Hey, nice package. This is something I will definetly use in the future. A client requested it on a previous project but we ran out of time to implement.
This is a great, something that i've always thought "that would be good"!
I get an error when installing it however
Server Error in '/' Application. The given key was not present in the dictionary. 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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.</address> Source Error:</address> 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.</address> Stack Trace:</address> [KeyNotFoundException: The given key was not present in the dictionary.]</address> System.ThrowHelper.ThrowKeyNotFoundException() +28</address> System.Collections.Generic.Dictionary`2.getItem(TKey key) +2645040</address> umbraco.cms.businesslogic.datatype.controls.Factory.GetNewObject(Guid DataEditorId) +41</address> umbraco.cms.businesslogic.datatype.DataTypeDefinition.Import(XmlNode xmlData) +418</address> umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) +163</address> umbraco.presentation.developer.packages.Installer.processInstall(String currentStep) +180</address> umbraco.presentation.developer.packages.Installer.PageLoad(Object sender, EventArgs e) +334</address> System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14</address> System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35</address> System.Web.UI.Control.OnLoad(EventArgs e) +99</address> umbraco.BasePages.BasePage.OnLoad(EventArgs e) +15</address> System.Web.UI.Control.LoadRecursive() +50</address> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627</address>
After this, the datatype does appear but there is no corresponding rendercontrol and it defaults to checkbox list.
I've tested it on several v4 sites and installation worked well on all of them. Installation actually doesn't have any code, it's just an Umbraco Package with Data type, one .aspx file and one .dll file.
It's v4.0.0. When I uninstall/reinstall, i don't get the error, but still no rendercontrol unfortunately. Here's the last 2 error log entries
At
/umbraco/developer/packages/installer.aspx?installing=businesslogic&dir=C:\websites\haddenrankin\public_html\data\088cd14c-8146-4d43-94d3-9733252f8bd9&pId=6
(Referred by:
http://beta5.geckonm.com/umbraco/developer/packages/installer.aspx):
System.Collections.Generic.KeyNotFoundException: The given key was not
present in the dictionary. at
System.ThrowHelper.ThrowKeyNotFoundException() at
System.Collections.Generic.Dictionary`2.get_Item(TKey key) at
umbraco.cms.businesslogic.datatype.controls.Factory.GetNewObject(Guid
DataEditorId) at
umbraco.cms.businesslogic.datatype.DataTypeDefinition.Import(XmlNode
xmlData) at
umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32
packageId, String tempDir) at
umbraco.presentation.developer.packages.Installer.processInstall(String
currentStep) at
umbraco.presentation.developer.packages.Installer.Page_Load(Object
sender, EventArgs e) at
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o,
Object t, EventArgs e) at
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at
umbraco.BasePages.BasePage.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
and
At /umbraco/developer/packages/installedPackage.aspx?id=6 (Referred by:
http://beta5.geckonm.com/umbraco/developer/packages/installedPackage.aspx?id=6):
System.NullReferenceException: Object reference not set to an instance
of an object. at System.Xml.XmlNode.RemoveChild(XmlNode oldChild) at
umbraco.cms.businesslogic.packager.data.Delete(Int32 Id, String
dataSource) at
umbraco.cms.businesslogic.packager.InstalledPackage.Delete() at
umbraco.presentation.developer.packages.installedPackage.confirmUnInstall(Object
sender, EventArgs e) at
System.Web.UI.WebControls.Button.OnClick(EventArgs e) at
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I've just checked. It really doesn't work correctly in v4.0.0. As I've developed it using v.4.0.1 sources it can depends on some things of that version.
I thought about it. It seems really logical to make some changes in a standard media picker. But as I am not in the core team I implemented it as a separate data type.
I have installed the package with the latest version of Umbraco 4.0.2.1 and checked that the installed files are in the right location, set my document type property to media picker with preview, cleared cache yet still don't see the image preview. It appears to behave the same as the standard media picker. Has anyone else not had this work or has a suggestion to fix?
Media Picker with Preview
Hi 2 all! There is one thing that is annoying me all the time in Umbraco. Media picker doesn't dispay image selected! Meet the new data type that extends standard Media Picker with preview function - "Media Picker with Preview"
Screenshots and download links are here.
PS. Tested only for Umbraco v4.
Hey, nice package. This is something I will definetly use in the future. A client requested it on a previous project but we ran out of time to implement.
Well done :)
Thanks Paul.
BTW it's easy to apply it to existing v4 projects without any loss of data.
This is a great, something that i've always thought "that would be good"!
I get an error when installing it however
Server Error in '/' Application.The given key was not present in the dictionary.
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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.</address>
Source Error:</address>
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.</address>
Stack Trace:</address>
[KeyNotFoundException: The given key was not present in the dictionary.]</address> System.ThrowHelper.ThrowKeyNotFoundException() +28</address> System.Collections.Generic.Dictionary`2.getItem(TKey key) +2645040</address> umbraco.cms.businesslogic.datatype.controls.Factory.GetNewObject(Guid DataEditorId) +41</address> umbraco.cms.businesslogic.datatype.DataTypeDefinition.Import(XmlNode xmlData) +418</address> umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) +163</address> umbraco.presentation.developer.packages.Installer.processInstall(String currentStep) +180</address> umbraco.presentation.developer.packages.Installer.PageLoad(Object sender, EventArgs e) +334</address> System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14</address> System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35</address> System.Web.UI.Control.OnLoad(EventArgs e) +99</address> umbraco.BasePages.BasePage.OnLoad(EventArgs e) +15</address> System.Web.UI.Control.LoadRecursive() +50</address> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627</address>
After this, the datatype does appear but there is no corresponding rendercontrol and it defaults to checkbox list.
Dan
Dan,
Strange... Do you install it on v4 version?
I've tested it on several v4 sites and installation worked well on all of them. Installation actually doesn't have any code, it's just an Umbraco Package with Data type, one .aspx file and one .dll file.
Could you please uninstall it and try again?
It's v4.0.0. When I uninstall/reinstall, i don't get the error, but still no rendercontrol unfortunately. Here's the last 2 error log entries
and
Any idea what has gone wrong?
Please check the following things:
1. If volandzz.MediaPickerWithPreview.dll is in /bin folder of the site?
2. If MediaPickerPreview.aspx is in /umbraco folder?
3. Do you have a new data type "Media Picker with Preview" in Developer -> Data Types ?
Yes to all 3, but still no correct "with preview" rendercontrol for the data type. Strange..
Dan,
I've just checked. It really doesn't work correctly in v4.0.0. As I've developed it using v.4.0.1 sources it can depends on some things of that version.
Sorry for the inconvenience.
So it works in v4.0.1 and v4.0.2.1 (tested!)
How to edit my first post in this forum? I don't see any "edit" link or button =(
No edits in the new forum :-(
Thanks for the info, I'll be sure to check it on the next fresh installation - good work!
This would be a great addition to the base Umbraco install. Seems common sense to me!
I thought about it. It seems really logical to make some changes in a standard media picker. But as I am not in the core team I implemented it as a separate data type.
How to remove "Solved" mark from post???? I have marked it accidently. This post is not an Issue at all!!
I have installed the package with the latest version of Umbraco 4.0.2.1 and checked that the installed files are in the right location, set my document type property to media picker with preview, cleared cache yet still don't see the image preview. It appears to behave the same as the standard media picker. Has anyone else not had this work or has a suggestion to fix?
Thanks
Hi, please change database type of Media Picker with Preview to integer. This will help! I'll find out what is the origin of the problem.
Yes that worked.
There is new version is available. http://our.umbraco.org/forum/developers/extending-umbraco/2757-Media-Picker-with-Preview-(Update)
This topic can be closed
is working on a reply...