Pages

Friday, December 9, 2011

Can not create MySite in SharePoint 2010

While creating MySite in SharePoint 2010 I got the following error


“Your personal site cannot be created. Contact your site administrator for more information”
I tried a lot of things to fix this error but nothing worked……
finally I decided to create the MySite Host from scratch and it worked like a charm.
Here are the steps which I performed:-
1. Create a Web Application
2. Delete the “sites” managed path
3. Create 2 managed paths
1. My – Explicit inclusion
2. Personal – wildcard inclusion



4. Create a site in the above created web application at location /my/ and choose the MySite Host template from Enterprise templates


5. Create a root site collection in the above created Web Application at location “/”. For enabling Self service site creation on that web application
6. Enable self service site creation on that web application




7. Go to Manage Service Applications -> User Profile Service Application and select Setup My Sites


8. Change the path in the My site host location to the new one which you have just created

9. Change the personal site path to “personal”




After doing this MySites should be created without any errors. I think this might be a bug in the Beta Version and will be fixed in the RTM.
I was not able to find the reason why the MySite Host which is created by SharePoint by default was not working but creating a new MySite host seems to solve the problem.

Monday, September 26, 2011

Displaying List Items From One Site Into Another Site


SharePoint Designer 2010 allows you to save a list view (which is simply a web part) as a webpart either in the top site gallery or as a file. You can then insert the web part into a parent or sub site to view the original (and any updates to) list items at the other site. This works between parent and sub site or the other way round. However, there seems to be an issue with saving the web part to the gallery directly. Instead, use the Save To File option.


Open the site where the original list is located in SharePoint Designer 2010, navigate to the list and select a view to export. Open the view and select the xsltview web part. From List View Tools, select the web part tab. Then, select To File (from save web part group). Type a name for the file (leave the extension as is) and answer Yes to the dialog that follows (do you want to show list data …).
Now, from your site collection’s site settings, select Galleries – Web parts. Click Documents from the ribbon’s Library Tools and upload the file you have just saved. Select a title and a group for your web part (so you’ll find it easily later). Now, in the other site, on a web part page (or any web part zone on a page), add a web part and select your group then your web part.
Saving to gallery directly seems to miss the Web ID (GUID) in the web part xml source (the element ) which references where the original list lives. You can edit the web part and fix it, of course, but easier to just save to file.
Note: if adding the web part from the browser results in an “unexpected error” and you are asked to open the page in maintenance mode, do so and try to add the web part from SharePoint Designer 2010. This was the case with a tasks list and may also apply to lists with workflows.

Tuesday, September 6, 2011

Creating Excerpt text with a read more link




src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.4.min.js"
type="text/javascript">
type="text/javascript">
$
(document).ready(function() {
$
("td").each(
function( intIndex ) {
var textToHide = $(this).text().substring(100);
var visibleText = $(this).text().substring(1, 100);

$
(this)
.html(visibleText + ('' + textToHide + ''))
.append('Read More…')
.click(function() {
$
(this).find('span').toggle();
$
(this).find('a:last').toggle();
});

$
(this).find("span").hide();
}
)

});



border="1">


"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."


"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"