Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 09:35
    Vladimir Dobrov
    9

    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.

  • Paul Blair 466 posts 731 karma points
    Jul 06, 2009 @ 11:24
    Paul Blair
    0

    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 :)

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 11:32
    Vladimir Dobrov
    0

    Thanks Paul.

    BTW it's easy to apply it to existing v4 projects without any loss of data.

  • dandrayne 1138 posts 2262 karma points
    Jul 06, 2009 @ 11:33
    dandrayne
    0

    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.Page
    Load(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

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 11:41
    Vladimir Dobrov
    0

    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?

     

  • dandrayne 1138 posts 2262 karma points
    Jul 06, 2009 @ 12:06
    dandrayne
    0

    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)

     

    Any idea what has gone wrong?

     

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 12:17
    Vladimir Dobrov
    0

    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 ?

  • dandrayne 1138 posts 2262 karma points
    Jul 06, 2009 @ 12:40
    dandrayne
    0

    Yes to all 3, but still no correct "with preview" rendercontrol for the data type.  Strange..

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 12:45
    Vladimir Dobrov
    0

    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!)

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 12:46
    Vladimir Dobrov
    0

    How to edit my first post in this forum? I don't see any "edit" link or button =(

  • dandrayne 1138 posts 2262 karma points
    Jul 06, 2009 @ 13:54
    dandrayne
    0

    No edits in the new forum :-(

    Thanks for the info, I'll be sure to check it on the next fresh installation - good work!

  • ben_a 65 posts 123 karma points
    Jul 06, 2009 @ 14:49
    ben_a
    101

    This would be a great addition to the base Umbraco install. Seems common sense to me!

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 16:07
    Vladimir Dobrov
    0

    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.

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 06, 2009 @ 17:13
    Vladimir Dobrov
    0

    How to remove "Solved" mark from post???? I have marked it accidently. This post is not an Issue at all!!

  • Ian Huntington 23 posts 53 karma points
    Jul 07, 2009 @ 13:10
    Ian Huntington
    0

    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

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 07, 2009 @ 13:33
    Vladimir Dobrov
    0

    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.

  • Ian Huntington 23 posts 53 karma points
    Jul 07, 2009 @ 13:43
    Ian Huntington
    0

    Yes that worked.

  • Vladimir Dobrov 45 posts 167 karma points
    Jul 07, 2009 @ 15:23
  • Vladimir Dobrov 45 posts 167 karma points
    Jul 07, 2009 @ 15:24
    Vladimir Dobrov
    0

    This topic can be closed

Please Sign in or register to post replies

Write your reply to:

Draft