Lists and Doc libraries both have Edit and DispForm pages. These pages have webpart zones on them, and adding your own webpart is possible. For some reason, sharepoint doesn't want to let you do it(the Edit Form Site action is grey'd out).
to get around this, add:
&PageView=Shared&ToolPaneView=2
to the end of the URL. It will put the page into the browse to add a webpart view. You should be good to go from there.
Wednesday, July 15, 2009
Tuesday, July 14, 2009
Error Code Gotchas due to Policy Settings
I run into a few problems on almost every SharePoint install.
David Szabo has put together a great post on some of the common ones:
http://blogs.msdn.com/dszabo/archive/2008/01/02/some-more-moss-gotchas.aspx
I've also run into issues with search not being able to search itself. This is due to a registry setting to prevent the server from DOS'ing itself. Make sure you add all the possibly URL's that your site is running to the registry setting.
http://support.microsoft.com/kb/896861
One more thing that always seems to come up a few months after the SharePoint portal has been up and running causes IIS to lock up. You'll get lots of errors in the event log for 6398, 7076, and 6482. You also won't be able to administer IIS. This has to do with two processes trying to access IIS admin service at the same time.
Install IIS Hotfix KB946517 and restart. This should fix the issue.
Problems with the timer service can also be caused by the scheduled task service being disabled. You'll re-enable it and it will turn off again. This is due to a group policy setting shutting it down. Have whoever manages the policy settings disable that setting on your sharepoint machines.
Errors with DCOM settings:
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID - Error 10016
Check out: http://geekswithblogs.net/mhamilton/archive/2006/12/19/101568.aspx
http://geekswithblogs.net/mhamilton/archive/2006/12/19/101568.aspx
I'm sure there will be more to come as I remember them.
David Szabo has put together a great post on some of the common ones:
http://blogs.msdn.com/dszabo/archive/2008/01/02/some-more-moss-gotchas.aspx
I've also run into issues with search not being able to search itself. This is due to a registry setting to prevent the server from DOS'ing itself. Make sure you add all the possibly URL's that your site is running to the registry setting.
http://support.microsoft.com/kb/896861
One more thing that always seems to come up a few months after the SharePoint portal has been up and running causes IIS to lock up. You'll get lots of errors in the event log for 6398, 7076, and 6482. You also won't be able to administer IIS. This has to do with two processes trying to access IIS admin service at the same time.
Install IIS Hotfix KB946517 and restart. This should fix the issue.
Problems with the timer service can also be caused by the scheduled task service being disabled. You'll re-enable it and it will turn off again. This is due to a group policy setting shutting it down. Have whoever manages the policy settings disable that setting on your sharepoint machines.
Errors with DCOM settings:
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID - Error 10016
Check out: http://geekswithblogs.net/mhamilton/archive/2006/12/19/101568.aspx
http://geekswithblogs.net/mhamilton/archive/2006/12/19/101568.aspx
I'm sure there will be more to come as I remember them.
Wednesday, July 1, 2009
Add Webparts Popup missing links and buttons
After a few days of modifying the CSS and master pages for SharePoint and thinking everything was good I found the Add Webparts popup had lost it's buttons and the Advanced Link!
Tracking down what's going wrong can be tricky. This page uses the same CSS as the rest of your site, so good luck tracking down what you did. Also, this page doesn't work in Firefox, so using FireBug isn't an option(more on that later). And worst, IE won't let me right click and get Page Source!
Fortunately, someone else has hit this problem:
http://sharethelearning.blogspot.com/2009/01/missing-buttons-and-link-on-add-web.html
This person did the work to track down which page is used: /_layouts/webpartgallerypickerpage.aspx
Going directly to the link will let you us FireFox and Firebug to track down the problem. For me, I was setting the height of the page to Auto, not 100%. This caused the buttons and advanced link to appear near the top of the page, and behind the box that lets you pick webparts. I simply added:
#mainTable{
height:100%;
}
to my CSS file, and everything was fixed. :)
Tracking down what's going wrong can be tricky. This page uses the same CSS as the rest of your site, so good luck tracking down what you did. Also, this page doesn't work in Firefox, so using FireBug isn't an option(more on that later). And worst, IE won't let me right click and get Page Source!
Fortunately, someone else has hit this problem:
http://sharethelearning.blogspot.com/2009/01/missing-buttons-and-link-on-add-web.html
This person did the work to track down which page is used: /_layouts/webpartgallerypickerpage.aspx
Going directly to the link will let you us FireFox and Firebug to track down the problem. For me, I was setting the height of the page to Auto, not 100%. This caused the buttons and advanced link to appear near the top of the page, and behind the box that lets you pick webparts. I simply added:
#mainTable{
height:100%;
}
to my CSS file, and everything was fixed. :)
Wednesday, April 15, 2009
View all Site content Blank after Import
Recently, A coworker and I had to move some sites around after a previous contractor setup the site with a bunch of different site collections and other junk that had to be removed as the site was moved to production.
Instead of moving the whole database, we only wanted to move a certain group of sites, so we used stsadm to export the sites and import them on the new server. After Import, we noticed that the the Quick Launch bar showed the correct lists, and they worked fine, but if we went to the "View All Site Content" link, nothing showed up other than the recycle bin.
Not sure what was going on here, but we were able to fix it. Here's the process we went through:
On the New server, backup the site.
Move the site(or change the URL) to something like_old.
import the site to the original site's URL.
If everything looked good, delete the_old site.
Maybe something else was going on here, but it works now.
Instead of moving the whole database, we only wanted to move a certain group of sites, so we used stsadm to export the sites and import them on the new server. After Import, we noticed that the the Quick Launch bar showed the correct lists, and they worked fine, but if we went to the "View All Site Content" link, nothing showed up other than the recycle bin.
Not sure what was going on here, but we were able to fix it. Here's the process we went through:
On the New server, backup the site.
Move the site(or change the URL) to something like
import the site to the original site's URL.
If everything looked good, delete the
Maybe something else was going on here, but it works now.
Wednesday, March 11, 2009
Disable Site Deletion
Have you had a user delete a site, and then complain that it's gone? I have! The solution is to disable the ability to delete a site!
Simply add this line of code to the core.js, or application.master, or anywhere else that is going to get loaded by the settings.aspx page. There is probably a dozen places you could add this code.
NOTE: I haven't tested this out, but at worst, all it's going to do is find the Delete web link, and hide it on the page. It doesn't actually change the page, just the display of the page. You could disable javascript in your browser and it would re-appear.
document.getElementById("ctl00_PlaceHolderMain_SiteAdministration_RptControls_DeleteWeb").parentElement.parentElement.style.display="none";
This basically says, find the "Delete this site" link, and turn off the display of that row in the table.
If you do need to delete the site, you could always just go directly to the _layouts/deleteweb.aspx page on that site, and click to delete.
Hopefully this will save you a few headaches.
You could get fancy, and change the link's HREF to be a mailto: link to your
helpdesk or sys admins. That way, if they want to delete a site, they will have to send you an email. Then you simply remove everyone's permissions. They'll think it's deleted, but you could easily bring it back if you needed to.
Good Luck!
Simply add this line of code to the core.js, or application.master, or anywhere else that is going to get loaded by the settings.aspx page. There is probably a dozen places you could add this code.
NOTE: I haven't tested this out, but at worst, all it's going to do is find the Delete web link, and hide it on the page. It doesn't actually change the page, just the display of the page. You could disable javascript in your browser and it would re-appear.
document.getElementById("ctl00_PlaceHolderMain_SiteAdministration_RptControls_DeleteWeb").parentElement.parentElement.style.display="none";
This basically says, find the "Delete this site" link, and turn off the display of that row in the table.
If you do need to delete the site, you could always just go directly to the _layouts/deleteweb.aspx page on that site, and click to delete.
Hopefully this will save you a few headaches.
You could get fancy, and change the link's HREF to be a mailto: link to your
helpdesk or sys admins. That way, if they want to delete a site, they will have to send you an email. Then you simply remove everyone's permissions. They'll think it's deleted, but you could easily bring it back if you needed to.
Good Luck!
Wednesday, February 11, 2009
Attachments and Customized Forms
Microsoft has relased a new hotfix for Sharepoint:
http://support.microsoft.com/kb/960311/en-us?spid=11677&sid=global
This allows you to use attachments and customized forms. Without this hotfix, the customized form you would get a popup error saying: "This form was customized not working with attachment. "
Supposedly, this hotfix fixes the issue. You will probably have to rebuild your forms though.
UPDATE:
There is another hotfix related to this issue. There are two parts, one is to update your Sharepoint server, the second is to add data to the forms. I've tested this out and it works!
http://support.microsoft.com/default.aspx?scid=kb;en-us;953271&sd=rss&spid=11373
http://support.microsoft.com/kb/960311/en-us?spid=11677&sid=global
This allows you to use attachments and customized forms. Without this hotfix, the customized form you would get a popup error saying: "This form was customized not working with attachment. "
Supposedly, this hotfix fixes the issue. You will probably have to rebuild your forms though.
UPDATE:
There is another hotfix related to this issue. There are two parts, one is to update your Sharepoint server, the second is to add data to the forms. I've tested this out and it works!
http://support.microsoft.com/default.aspx?scid=kb;en-us;953271&sd=rss&spid=11373
Tuesday, February 3, 2009
Dynamic drop down lists on Forms
Often, customers want options in one field to be driven by a different field in the form. For example, Categories and sub-categories. If the user picks A in field 1, field 2 should be filtered to only show options A1,A2,A3, etc.
Since sharepoint doesn't have a good way to do this, and I dont want to build a custom user control, javascript is the solution.
First, you'll want to create a function to clear out all the options from the second drop down list. Something like:
function clearSubCat(){
var subCat = getTagFromIdentifierAndTitle("select","DropDownChoice","Sub-Category");
var opts = subCat.options;
var len = subCat.length;
for (i = 0; i <len; i++)
{
subCat.remove(0);
}
}
If you google getTagFromIdentifierAndTitle, you'll find a nice blog article and the source for this function.
Second, you'll need a function to re-populate the drop down list given the value of colum 1:
function populateSubCat(){
var subCat = getTagFromIdentifierAndTitle("select","DropDownChoice","Sub-Category");
var catList = getTagFromIdentifierAndTitle("select","DropDownChoice","Category");
var cat = catList.options[catList.selectedIndex].text;
clearSubCat();
switch(cat)
{
case "Directives":
var optA = document.createElement('option');
optA.text = "DOI";
optA.value = "DOI";
subCat.options.add(optA);
}
}
You'll have to add more cases to the switch statement.
Basically, this gets the DOM object for the two categories, and inserts values into the sub-category based on the value in the category.
Third, you'll want to setup the javascript to set the onChange event for the Category drop down list.
function filterSubCat(){
var catList = getTagFromIdentifierAndTitle("select","DropDownChoice","Category");
catList.onchange = function() {populateSubCat()};
populateSubCat();
}
I call the filterSubCat() function in a content editor webpart.
In my case, the Drop down list values were limited and Static. If your lists are more dynamic this may not be the best solution.
Since sharepoint doesn't have a good way to do this, and I dont want to build a custom user control, javascript is the solution.
First, you'll want to create a function to clear out all the options from the second drop down list. Something like:
function clearSubCat(){
var subCat = getTagFromIdentifierAndTitle("select","DropDownChoice","Sub-Category");
var opts = subCat.options;
var len = subCat.length;
for (i = 0; i <len; i++)
{
subCat.remove(0);
}
}
If you google getTagFromIdentifierAndTitle, you'll find a nice blog article and the source for this function.
Second, you'll need a function to re-populate the drop down list given the value of colum 1:
function populateSubCat(){
var subCat = getTagFromIdentifierAndTitle("select","DropDownChoice","Sub-Category");
var catList = getTagFromIdentifierAndTitle("select","DropDownChoice","Category");
var cat = catList.options[catList.selectedIndex].text;
clearSubCat();
switch(cat)
{
case "Directives":
var optA = document.createElement('option');
optA.text = "DOI";
optA.value = "DOI";
subCat.options.add(optA);
}
}
You'll have to add more cases to the switch statement.
Basically, this gets the DOM object for the two categories, and inserts values into the sub-category based on the value in the category.
Third, you'll want to setup the javascript to set the onChange event for the Category drop down list.
function filterSubCat(){
var catList = getTagFromIdentifierAndTitle("select","DropDownChoice","Category");
catList.onchange = function() {populateSubCat()};
populateSubCat();
}
I call the filterSubCat() function in a content editor webpart.
In my case, the Drop down list values were limited and Static. If your lists are more dynamic this may not be the best solution.
Subscribe to:
Posts (Atom)