x First time here? Check out the FAQ
  • Avatar579posts1011karma

    Media Picker w/ Preview after upgrade

    Nik Wahlberg started this topic More than a year ago , this topic was edited at: Sunday, February 06, 2011 2:03 PM

    Hi All, I just upgraded one of our larger intranets to 4.5.2 and have found that the MEdia Picker with Preview doesn't work? It allows me to click the "Choose..." link and popup the tree, but when I click a media node in the tree nothing happens (it doesn't select anything)? I tried changing the data type to the standard media picker but then that wipes out all of my data for the fields. Has anyone successfully worked around this issue?

    Thanks for your help!

    -- Nik 


  • Replies

  • Avatar579posts1011karma
    Comment with ID: 52590
    Nik Wahlberg posted this reply More than a year ago

    To add onto this...here's the FireBug error I get when the right-hand pane is first loaded:

    Type is not defined

    No error when trying to select the media. 


  • Avatar1450posts4678karma
    HQ Comment with ID: 52656
    Matt Brailsford posted this reply More than a year ago

    I'm not 100% (having not done it myself), but isn't Type.registerNamespace part of the MS Ajax toolkit? which I'm pretty sure the latest Umbraco doesn't have a dependency on, so look to me like something may not have been updated correctly.

    This is just my educated guess though, so could be wrong =)

    Matt


  • Avatar579posts1011karma
    Comment with ID: 52659
    Nik Wahlberg posted this reply More than a year ago

    Hey Matt, thanks for chiming in. The error is occurring in the DependencyHandler.axd line 205. I have the Ajax Toolkit in the bin still since contour needs that as far as I know. What about updating the data type manually? This issue would go away if I was able to change the data type associated with this property. I'm guessing I have to put on my SQL hat for that... :) 

    Cheers!


  • Avatar1450posts4678karma
    HQ Comment with ID: 52661
    Matt Brailsford posted this reply More than a year ago

    Hey Nik,

    Is this a Contour thing? As, isn't the advanced media picker, just a checkbox in the prevalues for the regular media picker?

    Matt


  • Avatar579posts1011karma
    Comment with ID: 52663
    Nik Wahlberg posted this reply More than a year ago

    It's not a Contour issue really, this happens in the content section when editing a page with the Media Picker w/ Preview data type. This package is not listed as compatible with 4.5.2 which I should surely have checked before upgrading (DOH!). So, in light of the issue I think the best approach is to revert back to the standard out-of-the-box media picker. Unless, of course, there's an update for the package floating around out there. 

    -- Nik


  • Avatar1450posts4678karma
    HQ Comment with ID: 52665
    Matt Brailsford posted this reply More than a year ago

    Ahhhhh, I see.

    If the advanced media picker saves the value as the same datatype as the regular media picker, you might be able to use the SQL statement out of my doc type extensions package for switching over data types:

    UPDATE	cmsPropertyData
    SET	propertytypeid = {2}
    WHERE	id in (
    	SELECT	pd.id
    	FROM	cmsPropertyData as pd
    		inner join umbracoNode as n on n.id = pd.contentNodeId
    		inner join cmsContent as c on c.nodeId = n.id
    	WHERE	n.nodeObjectType = 'C66BA18E-EAF3-4CFF-8A22-41B16D66A972' and
    		c.contentType = {0} and 
    		pd.propertytypeid = {1}
    )

    Where {0} is your doc type id, {1} is the property id, and {2} is the target property type id

    Don't forget to backup beforhand ;)

    Matt


  • Avatar579posts1011karma
    Comment with ID: 52666
    Nik Wahlberg posted this reply More than a year ago

    right-on Matt! I knew you'd have something up your sleeve :) I'll give that a try. 

    -- Nik


  • Avatar579posts1011karma
    Comment with ID: 52670
    Nik Wahlberg posted this reply More than a year ago

    Wow, this one is gonna suck. Unfortunetly, I won't be able to do what you are suggeting Matt. The [SQL] data types are different between the two custom types (one text and one int). So, I have to switch the data type for the content type in question, then go through the DB and move the value from dataNtext to dataInt in the cmsPropertyData column for ALL of the nodes. I'll have to write a stored proc or somethign to do this as we're talking about hundreds of nodes. 

    Oy! 

    -- Nik


  • Avatar1450posts4678karma
    HQ Comment with ID: 52671
    Matt Brailsford posted this reply More than a year ago

    Hey Nik.

    Are you needing to convert from text to int, or int to text? I'm pretty sure it could all be 1 statement.

    Matt


  • Avatar579posts1011karma
    Comment with ID: 52672
    Nik Wahlberg posted this reply More than a year ago

    Hey Matt, from text to int. And I think you're right, one update should do it with the correct sub-selects....


Pages:

Please login or Sign up To post replies