I put those in for legibility. :) No breaks in the actual entry. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Turner Sent: Tuesday, 5 July 2011 3:35 PM To: ozMOSS Subject: RE: Custom Edit Control using AdditionalPageHead delegate
You can't have line breaks inside the "" for the safe control Assembly setting. Regards Paul Turner Practice Lead - SharePoint SMS Management & Technology M 0412 748 168 paul.tur...@smsmt.com<mailto:paul.tur...@smsmt.com> www.smsmt.com<http://www.smsmt.com/> About SMS: Innovation House, Technology Park, Mawson Lakes Boulevard, Mawson Lakes SA 5095 SMS Management & Technology (SMS) [ASX:SMX] is Australia's largest publicly listed Management Services company. We solve complex problems and transform business through Consulting, Technology and Systems Integration P please consider the environment before printing this email ________________________________ From: ozmoss-boun...@ozmoss.com [ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone [paul.no...@ceosyd.catholic.edu.au] Sent: Tuesday, 5 July 2011 2:04 PM To: ozMOSS Subject: RE: Custom Edit Control using AdditionalPageHead delegate My elements file: <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Control Id="AdditionalPageHead" ControlAssembly="CEO.Custom.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3fb3ebbc8489d02d" ControlClass="CEO.Custom.Controls.PageHead" Sequence="300" /> </Elements> DLL in GAC: [cid:image002.png@01CC3B2C.BBDE7560] SafeControl entry: <SafeControl Assembly="CEO.Custom.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3fb3ebbc8489d02d" Namespace="CEO.Custom.Controls" TypeName="*" Safe="True" /> And the full error: Failed to create a control from assembly 'CEO.Custom.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3fb3ebbc8489d02d', class 'CEO.Custom.Controls.PageHead': The control with assembly name 'CEO.Custom.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3fb3ebbc8489d02d' class name 'CEO.Custom.Controls.PageHead' is not allowed for web at URL 'http://devintranet.ceosyd.catholic.edu.au/teams/test'. The type is not registered as safe. DelegateControl: Exception thrown while building custom control 'Microsoft.SharePoint.SPControlElement': System.ArgumentException: The control with assembly name 'CEO.Custom.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3fb3ebbc8489d02d' class name 'CEO.Custom.Controls.PageHead' is not allowed for web at URL 'http://devintranet.ceosyd.catholic.edu.au/teams/test'. The type is not registered as safe. at Microsoft.SharePoint.Utilities.SPUtility.CreateServerControlFromAssembly(String sControlAssembly, String sControlClass) at Microsoft.SharePoint.SPControlElement.BuildCustomControl(TemplateControl tctlPage, String sControlAssembly, String sControlClass, String sControlSrc, XmlNode xnElementDefinition, SPFeatureDefinition featdefElement, String sElementId) at Microsoft.SharePoint.SPControlElement.BuildCustomControl(TemplateControl tctlPage) at Microsoft.SharePoint.WebControls.DelegateControl.BuildCustomControlResilient(SPControlElement ctlelemDefinition) From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Turner Sent: Tuesday, 5 July 2011 1:37 PM To: ozMOSS Subject: RE: Custom Edit Control using AdditionalPageHead delegate Check your elements.xml and make sure that you have fully qualified assembly references (with keys etc...) and that this setting is getting added to the web.config Regards Paul Turner Practice Lead - SharePoint SMS Management & Technology M 0412 748 168 paul.tur...@smsmt.com<mailto:paul.tur...@smsmt.com> www.smsmt.com<http://www.smsmt.com/> About SMS: Innovation House, Technology Park, Mawson Lakes Boulevard, Mawson Lakes SA 5095 SMS Management & Technology (SMS) [ASX:SMX] is Australia's largest publicly listed Management Services company. We solve complex problems and transform business through Consulting, Technology and Systems Integration P please consider the environment before printing this email ________________________________ From: ozmoss-boun...@ozmoss.com [ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone [paul.no...@ceosyd.catholic.edu.au] Sent: Tuesday, 5 July 2011 12:56 PM To: ozMOSS Subject: RE: Custom Edit Control using AdditionalPageHead delegate Right. DisplayName it is then. :) So now I have my Page Head control available right where I want it. The only problem is that the content doesn't get added to the AdditionalPageHead delegate once published.[cid:image003.jpg@01CC3B2C.BBDE7560] I'm getting "The type is not registered as safe" in the logs. The SafeControl entry for the assembly is present. Failed to create a control from assembly ...: The control with assembly name '...' class name '...PageHead' is not allowed for web at URL 'http//...'. The type is not registered as safe. What is an "Empty SharePoint Element" and how do I go about creating one in VS 2005?? From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Tuesday, 5 July 2011 10:52 AM To: ozMOSS Subject: RE: Custom Edit Control using AdditionalPageHead delegate Can I ask if the following uses the internal or display name? Or is better to reference them by ID? SPContentTypeId pageCT = SPContext.Current.Web.ContentTypes["CEO Page Head"] PageHead = SPContext.Current.ListItem.Fields["PageHead"] From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Tuesday, 5 July 2011 10:28 AM To: ozMOSS (ozmoss@ozmoss.com) Subject: Custom Edit Control using AdditionalPageHead delegate Hi all, I want to add a textbox to the Edit view for publishing pages that then adds the content to the page head when published. This is to allow per page scripting when required. I've been using this 2010 example which doesn't require any modification of the masterpage but can't work out what's required to do the same for 2007. No idea what this empty module is or how/why he adds the safe control entry to its properties. http://blog.concurrency.com/sharepoint/sharepoint-2010-custom-fields-editor-control-in-page-edit-mode/ I've created my feature that includes the custom content type, field definition (Note), and control code but I'm not getting the binding. :( Do I need to create en empty controltemplate that references my assembly? Can anyone offer the best approach? Thanks, Paul ________________________________ NOTICE - This communication is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking any action in reliance on, this communication by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient of this communication please delete and destroy all copies and telephone SMS Management & Technology on 1300 842 767 immediately. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of SMS Management & Technology. Except as required by law, SMS Management & Technology does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free from errors, virus, interception or interference.
<<inline: image002.png>>
<<inline: image003.jpg>>
_______________________________________________ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss