Domino URL commands break SharePoint Mobile View
This post is going to discuss an issue I ran into where certain links in a links list can cause Mobile views to fail to render. This was actually encountered when using Domino URL Commands, specifically the ?OpenDocument URL command in my case. When you run into this situation, the error message you will receive is the following, which is not really helpful and is not really friendly. The message you will get is Value cannot be null. Parameter name: str as displayed in the screenshot below.
Background
I was recently working with a customer who had a number of lists to reference documents that were pretty critical to operations in their environment. Whenever users used their IPhones or Android devices, they were unable to access lists, or the content in the lists, the error message above was returned to the user. Upon further investigation, it was discovered that even using any of the supported browsers (desktop or mobile) to access the mobile view the issue would occur. For anybody who has never accessed a mobile view, all you have to do is append ?Mobile=1 to the end of a page URL. It has to be a page URL, one example of such would be https://contoso.com/pages/default.aspx?mobile=1.
Investigation
During our investigation, we had determined that any supported desktop browser could access the desktop version of the list view without any issue. Any supported browser would fail when attempting to view the mobile view of the list. Typical troubleshooting techniques (netmon, fiddler, ULS logs, etc.) did not turn up anything too interesting. We started by eliminating things like special characters from the site name, list name, folder names, etc. We were also able to rule out the possibility that it was due to the length of the URL.
Through further investigation, we found out that this issue only occurred in lists of links to operational documents. Upon further investigation, it was determined that each of these links included Domino URL commands. For anyone who is not familiar with, or who has not caught on to what Domino URL commands are, please check the following link:
One example of a Domino URL command, as noted above is the ?OpenDocument command. This instructs Domino to open the document.
Other investigations reveal that although Android devices do allow you to see the "desktop" version of the web site, this was not the case using our IPhone devices, which were running IOS 5. There are however a number of third party browsers available for download or purchase which allow you to view the desktop version of the page to work around the issue.
Reproducing the Issue
Reproducing the issue is actually pretty easy once you understand what's happening.
Step 1.
Take any links list in your environment, and add a URL that includes a URL command, such as the following:
https://MyServer.MyCompany.com/somepage.aspx?OpenDocument
Step 2.
Access the Mobile view of your list by appending ?Mobile=1 to your list view
Step 3.
Observe that your list view is now broken
Assumptions
Since it reproduces with supported desktop browsers, it's not a problem with the mobile client. It's a problem with the view itself. My assumption, has not been confirmed, is that the mobile view is trying to rewrite or re-factor the URL. When it gets to a URL with a URL command in it, it doesn't handle the URL well, and throws up an ugly error.
Resolution
Remove URL Commands from the links in the links list. In the case of ?OpenDocument, it really doesn't matter. You can remove that part of the URL and the link will continue to function just fine.
Feedback
As always, if you have any questions or feedback, let me know. If you have any other workarounds, I'd like to hear that too. Thanks for reading!
You can also follow me on Twitter: