SharePoint HTML Editor Field Control Converts Relative URL to Absolute URL - sharepoint

Put a relative URL (no server name) into the HTML Editor and save the page. The URL is converted to an absolute URL (http://server_name is added to the beginning).
This is posing a problem for moving content from our staging to production environment, as the server names are different.
The exact same scenario is common when using the Content Editor Web Part, and Microsoft has published a fix here:
http://code.msdn.microsoft.com/WssCewpLinkFixup/Release/ProjectReleases.aspx?ReleaseId=2210
The solution creates a custom ASP.NET 2.0 control adapter to change the rendering process of all Content Editor Web Parts in the application.
But we are using the HTML Editor Field Control, not the Content Editor Web Part.
Can the same approach be used to change the behavior of a web part?
Has anyone else encountered this problem and solved it? A Google search has come up with no answers, only many frustrated users and abandoned forum threads, including this one on StackOverflow from a year ago:
Publishing HTML Field Control Converts Relative URL to Absolute URL
Many thanks in advance.

You may be able to put a little bit of JavaScript in the link, either
Link
or
Link
Haven't tried it, but it may work.

Related

SharePoint content editor web part is missing the url to HTML file in edit mode

This is a weird one, but I am not sure if I am missing something here. There used to be a location for the link to HTML files in content editor web parts. I cannot find the url now! I want to know which HTML file the web part is showing at the moment so I can modify it. It not under any of these: Appearance, Layout, Advanced.
The problem was SharePoint Online's content type editor had gone missing. So I managed to enable the feature back on again. As soon as I enabled the feature, the content editor edit panel went back to its previous status. I used this to do it:
Content Editor Web Part missing on SharePoint Online

Liferay search results

I am currently involved in project where we are using Liferay (6.1 GA2).
It seems that Liferay search results provide links to Web Content Fragments instead of to the pages containing them.
Have any of you gone through this issue? Do you know how to solve it?
Thanks a lot pals.
Best, Alberto
You can have a lot more content in the backend than actually displayed on any page. Further, you can display any article on multiple pages at once.
A way to work around this is to specify in the "Web Content Search" portlet that you're only interested in content that is actually published. However, this does not solve your second problem: The content can still be published on many different pages.
Every content can have a "Display Page" - the setup of such a display page is well explained in the UI (see the Web Content Editor) so that you'll actually see a proper page with the search results.
If you actually want to search for pages only instead of content (you might miss out on some metadata), I'd recommend to go with some spider solution that spiders your website, indexes the pages independent of their construction elements (articles) and search that external index.

SharePoint 2010 site template with a form library - the form template contains site URL

I am working on a site template that will be used to create hundreds of sites for different org units. The site should contain a form library, with an InfoPath form template.
My question is - is it possible to create a template and let power users create sites, without any administrator or developer involvement? If not - what's the easiest alternative?
The problem is that the form template contains the site URL and I don't know if this can be avoided. As a consequence, when a site is created and a form submitted - it ends up in the library of the original site.
I have created a handful of sites for the pilot project and what I've been doing so far is to uncab the XSN file, edit the URL manually, repackage into XSN and publish to the new library. This works, but involves a manual step in the site creation process that I wish to avoid. Here are the lines I'm editing:
<xsf:submit caption="Submit" disableMenuItem="no" onAfterSubmit="close" showStatusDialog="no">
<xsf:davAdapter name="SharePoint Library Submit" submitAllowed="yes" overwriteAllowed="no">
<xsf:folderURL value="http://my_farm_url/subsite1/form_lib"
Also here:
<xsf2:solutionPropertiesExtension branch="wss">
<xsf2:wss path="http://my_farm_url/subsite1/form_lib"
I'm changing subsite1 to subsite2.
I tried to set a relative URL, first to the submit element, then to both, to no avail. The form was being rendered (in browser), the submit worked (no errors) but then the submitted form was not in the library. Looking further into this, the forms ended up being submitted to a form library on the root site - http://my_farm_url/form_lib! It makes sense when you think about it, that's where a relative url of form_lib takes you to, from the site, from the root site perspective.
For the moment the only solution I envision is to create a tool that will help users create sites based on the template, fixing the XSN behind the curtains. I don't know how to publish a form template programmatically but it should be possible. Apart from this unknown, it's also not very automated and I'll be very happy if a proper solution is possible that will work with SharePoint/InfoPath tools only.
You need to schedule a EventReceiver there is no way to do it for configuration.
In EventReceiver you have to read the file "Manifest.xsf", update the XML node is defined where the url and save the file "Manifest.xsf".
To read the XML node is necessary to use System.Xml.dll

SharePoint error relating to page layout after creating site from template

Inside SharePoint I've previously created a site template by appending _layouts/savetmpl.aspx to the end of my site and new sites have been created correctly and work as expected.
I've now come to do the same thing again and yet this time the new site is throwing an error relating to the page layout.
The error is:
This page is not using a valid page layout. To correct the problem, edit page settings and select a valid page layout.
When I try to select a different one, there is only the one to select. This page layout is in use on other sites and they render fine.
Has anyone else seen this issue?
All the best
First, if you append the _layouts/savetmpl.aspx tho the url, i suppose you dont have it in the Site Settings options, so you are using a Publishing site. This is because Microsoft doesn´t support this option (save as template in publishing sites). And they dont support it because it has some bugs, for sure.
So, I would recommend not using this option in important sites, or if you plan to ask support to Microsoft in the future.
However that error indicates that the page layout or his associated content type (ou parent content types) are not correctly installed in the site collection. Are you using your own (custom) content types? Please confirm if the ID of the associated content type (something like 0x0100C6739B7D12DE419aA2F9A2F96CC26818) is exactly the same in the Page Layout on working sites and in the not working sites.
Hope it helps
Do the sites/site collection where the templates working have all the same features enabled as teh sites/site collection where the template isn't working?
Can you check the server logs? <12 hive>\LOGS
Did you add a custom page layout, use it, and then forget to check that "save content" checkbox when you saved your template?

SharePoint: Back up single page

I need to back up a sharepoint web page which containts web parts and other html tweaks. I would like to keep a back up of the page itself with the web parts in the appropriate places, is this possible? Right now I just opened SharePoint designer, opened my page and saved as to my hard drive. Is there another way? Is this a complete back up of the page? Thanks.
I do the same for small changes and it has worked fine for me up to now. That said the only offical way to do it is use Microsoft's Data Protection Manager software which will let you backup/restore individual pages.
Of course you can go the doclib where the page is stored and use the ECB SendTo>>Download a copy
the interesting part of this approach is that you get the ASP.NET markup (w/server control specs)...

Resources