SharePoint removing trailing slashes in URL's - url

I'm havig an issue with SharePoint 2010 Removing trailing slashes from URL's; I have 3 scenarios where this happens outlined below: ( all are happening on a Publishing Site )
If I have a Summary Links Web Part and setup a link, let's say to an external site, that requires a trailing slash, when the page is saved it is removed and the link no longer works. I have tried adding 2 slashes as suggested by some googling, this works the 1st time you save the page as the last slash is removed, but edit the page again and save, and again the other slash is removed.
The second scenario, which is far more serious, is I have created a custom Master Page, with some static links embeded in it, and as before require the trailing slash. When I changed the Alternate Access mappings in Central Admin( because I was putting a new site from development into Production with existing DNS entries on our network...) SharePoint somehow removed all trailing slashes from Links in my master page; what's even worse is that there was no version created, no way to revert it except manually checkout and re-edit the page and check it in again. This scenario, because no checkout or versioning happened, makes me think that a database procedure or routine fired that removed the slashes.
The 3rd scenario is the same as the second except I moved a site using the Manage Content and Structure underneath another one.
I don't know if these are the only time it happens, haven't had tme to test any other scenarios.
OK to my question, is this a setting or feature of SharePoint 2010 that can be turned off? or is it sounding more like a BUG

I'd love to say "you shouldn't need the trailing slash as required" but unfortunately reality does not always support that.
Regarding the Summary Links webpart. Have you tried writing it the long way around with a Content Editor Web Part or a Links list and then adding a Links webpart to the page?
2nd/3rd scenario: Are you sure they links are correct after checking in the master page? Could you try to add the links on the fly with javascript? Not great performance-wise, but it buy you some time to figure it out the correct way later.

Related

Create umbraco subdomain for an umbraco site

I am using umbraco 7.1.3.
My requirement is to create another sub-domain in main site dynamically as per user request.For example I have implemented umbraco cms for my site "ww.xyz.com" & I am updating content through umbraco login. Now I want to create sub-domains for different clients as per their request... like : "www.xyz.com/client1", "www.xyz.com/client2" and so on...
Now all sub-domain site should have it's own umbraco framework, so client-site (sub-domain owner) can login and update their information respectively.
To achieve this requirement I implemented following steps...
First I register a umbraco website in IIS and configure it, and that worked properly.
Then I register another umbraco website in IIS and configured it, and that also worked properly.
Now to implement sub-domain logic...
I simply copied 2nd website's folder in to first website folder. Then convert that folder to application through IIS.
As per my expectation this should work, As I have already done the same in asp.net and it worked.
But with umbraco I am facing issue like "Invalid key value".
I think the issue is related to some umbraco configuration, but I am not able to figure it out.
Thanks & Regards
A bit of an open door, but since I don't see it mentioned in any of the comments and it's a bit hidden away in Umbraco 8. Have you tried setting the urls in the Cultures and Hostnames section?
Note: you get to this by going to "Content", in the content tree right click on your homepage and now you get several extra options which are normally hidden away with also the very useful Hostname and Cultures option which allows you to support multiple urls.

Umbraco 6 - Published page throws 404 in specific scenarios

I am running an instance of Umbraco 6.1.x and it has started throwing 404 on published pages.
My page structure is as follows,
Content
Home
About
Course
...
Component
Home
About
Course
Where component holds all resources and modules (HTML sections and stuff) for a page and using a partial view macro I dynamically load all components at runtime for a specific page.
We are facing an issue where we get 404 on every page after a full republish once we hit the HomePage. Before hitting home page they are all fine, but the moment we hit the homepage they are all throwing 404. By overriding the handlers I found out that they are hitting ~/umbraco/RenderMvc!
Any idea what can cause this?
Thanks in advance.
EDIT:
It is actually throwing:
No template exists to render the document at url '/'
considering the aforementioned scenario.
I have proper allowed template setup and property on nodes are showing the correct template associated with the respective items. Not sure why it's losing template info. I can force it to load under correct template using ?altTemplate=templateName.
Some pointers, we have a view in Views/Shared folder (apart from macro partials) tied to a surface controller.
One thing I would like to say is, we are using nested (library.RenderMacroContent with Umbraco markup) in our partial views and I have realized that the whole page throws 404 if there's a page with a link to the broken page which is broken (i.e. page got re-created and on t==e of the components is holding a link to the page with previous id). Suggestions?
did you get to the bottom of this? We're having exactly the same problem at the moment, on the same version of Umbraco.
I've noticed that when it happens, the umbraco.config becomes either corrupt or rolls back to a much, much earlier version, with all sorts of attributes missing. This lead us to believe it was a sync issue between the DB and umbraco.config.
We initially thought we had solved it by deleting App_Data > TEMP > ExamineIndex and recycling the app pool etc. Maybe give this ago, as it fixed it for a while for us, but alas, the demon has reared its ugly head once more. We are still in a full on dev stage though, so the constant changing may be complicating it further for us - perhaps it will be a fix for you.
If you have any more info, or even a fix, it would be greatly appreciated.
Cheers
EDIT:
Ok, I think I've solved this now, but only time will tell. Try emptying your recycle bin & then republish entire site.
I managed to consistently recreate the bug using IIS SEO site analysis. Each time I did this, the log threw up an error 'cannot find node id xyz', turns out that (and other) nodes were in the recycle bin. Upon emptying it the errors stopped. Good luck!

How to find unused items in the Content folder in Umbraco

I'm setting up a new Umbraco site to replace an older ASP.Net site.
The old site is riddled with old content that isn't linked to anymore. I want to prevent the same thing from happening on the new Umbraco site.
Is there a good way of finding unused items in Umbraco's Content folder (not Templates or Document Types)?
If that's not feasible, is there a way to keep content owners from creating a bunch of content pages and abandoning them instead of deleting them?
It's an interesting question, but from an SEO point of view an old page of content has plenty of power & I wouldn't delete it if possible.
I don't know of an umbraco package that will tell you which pages don't have links - but Google will tell you. If you want to know what links to www.example.com/oldpage.html then type the following into Google:
link:www.example.com/oldpage.html
(https://support.google.com/webmasters/answer/55281?hl=en)
I wouldn't delete old content (unless it is now plainly wrong) I'd keep all the old content & tidy it away:
Create a folder under home called something like 'archive'
Move all your dead content there
Use a 301 redirection package or change urlrewriting.config in case there are any external links to these dead pages as the old urls will now return 404 errors
Make sure that the sitemap contains links to these new archive pages
You will now have cleaned up the structure, but without losing any SEO value.

Sitecore gives a blank page with just the text "Default page" in my MVC solution

When I browse to my startpage, e.g. /sv I get a blank page that just says "Default Page". However when I try /sv/ it works. Subpages like /sv/example work without slash though. I'm using Sitecore 7.1 with only MVC views.
Remove the default.aspx file from the web root.
That will fix your problem.
When requesting URLs without a slash at the end, the "StripLanguage" processor of the preprocessRequest pipeline rewrites path to the value of the Settings.DefaultPageName setting ("default.aspx" by default). Since such page physically exists on your site, ASP.NET MVC routing system does not handle such request, and the file itself is served. This behavior is controlled over the RouteCollection.RouteExistingFiles property (false by default), please refer to the following article for the details:
http://msdn.microsoft.com/en-us/library/system.web.routing.routecollection.routeexistingfiles.aspx.
In other case, when a slash is added after a language, this won't happen, since the "StripLanguage" processor does not rewrite the path (which is also not an expected behavior). As a result, request URL does not match the "default.aspx" static file in the site and request is getting processed by ASP.NET MVC.
I suggest you to add the following setting to the "Web.config" file (instead of creating a "default.aspx" page), which points to the "default" page without extension:
<settings>
<setting name="DefaultAspxPageName" value="default"/>
</settings>
After that, the /default URL, without ".aspx" extension, will be processed by MVC and the appropriate item will be rendered independently of a slash after the language URL section.
On my side it works.
I want to point out that the answer to this is not my own but given from the support over at Sitecore who I want to extend a big "Thank you!" to. I had googled this forever until they helped me and I thought that I want to have this document and easily found when others struggle with it. A bug is filed and they are working on fixing it.
DefaultAspxPageName is Hidden Setting.. We can find more such hidden settings..#
http://www.newguid.net/sitecore/2014/sitecore-hidden-string-configuration-settings/

Does HTML5 cache manifest caching work differently than regular browser caching?

Ok, I'm building a PoC for an ASP.NET MVC 4 mobile application that needs to have offline capabilities, and I have several questions about whether I'm designing the application correctly and also what behavior I will get from the cache manifest.
I'm progressing with the PoC but I'm observing a weird behavior on a working controller action right after adding the manifest attribute to my Layout.cshtml.
Before adding the attribute, every time I requested that URL, a breakpoint I had on the controller action would be hit just once every time. After adding it, the breakpoint is being hit 3 times the first time the page is requested (first time ever), and it is no longer hit at all until I manually delete the local cached manifest.
Nothing else changed, so this makes me believe that this type of offline caching works differently that the regular way in which browsers cache works. I'm thinking that since the page I'm visiting is listed on the manifest, the breakpoint is hit the first time because I requested the page, and then a second time because it is listed on the manifest.
That is weird already. Why is that?
Besides that, why is it being hit a third time?
I've verified that the behavior goes away if I manually delete the locally cached manifest and also remove the manifest attribute from the html tag, so this is most likely the culprit.
Can anyone explain what's going on please? Thanks.
Well, no one replied and I was no longer able to reproduce the breakpoint being hit 3 times, although I'm sure it happened a few times.
And yes, appcache or html manifest caching works in a different way than regular caching.
With the first visit a page, that had the manifest attribute on its html tag, the same page being listed on the manifest made a request to the server for the same page.
I'm making the answer a wiki in case someone wants to add anything.

Resources