Search In
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
To add onto this...here's the FireBug error I get when the right-hand pane is first loaded:
Type is not definedType.registerNamespace('umbraco.presen...s._succeeded=null;this._failed=null;}
No error when trying to select the media.
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
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!
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?
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.
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 ;)
right-on Matt! I knew you'd have something up your sleeve :) I'll give that a try.
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!
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.
Hey Matt, from text to int. And I think you're right, one update should do it with the correct sub-selects....