- Administrator approved InfoPath forms with custom code were causing errors (no indication of what the error was)
- Search Service was failing to crawl content with the error "Access Denied."
Enjoy!
Technological musings and ramblings, which currently revolve around SharePoint.
<SCRIPT LANGUAGE="JavaScript">
<!--
function disableChildren(currentElement)
{
if (currentElement)
{
if(currentElement.tagName == "IFRAME")
{
frm = window.frames[currentElement.id].document;
disableChildren(frm.getElementsByTagName("html")[0]);
}
var i=0;
var currentElementChild=currentElement.childNodes[i];
while (currentElementChild)
{
disableChildren(currentElementChild);
i++;
currentElementChild=currentElement.childNodes[i];
}
if (currentElement.tagName)
{
currentElement.setAttribute("disabled", "true");
currentElement.setAttribute("contentEditable",
"false");
currentElement.setAttribute("onclick", "");
currentElement.removeAttribute("href");
}
}
}
function hideRowsAfter(currentRow)
{
row = currentRow.nextSibling
while (row)
{
row.style.display = "none";
row = row.nextSibling;
}
}
function findControl(FieldName, opp)
{
FieldName = "FieldName=\"" + FieldName + "\"";
//get all comments
var arr = document.getElementsByTagName("!");
for (var i=0;i < arr.length; i++ )
{
// now match the field name
if (arr[i].innerHTML.indexOf(FieldName) >= 0)
{
switch(opp)
{
case 0: //disable all children
disableChildren(arr[i].parentNode.parentNode);
break;
case 1: //hide row
arr[i].parentNode.parentNode.style.display="none";
break;
case 2: //hide all rows after current
hideRowsAfter(arr[i].parentNode.parentNode);
break;
default:
break;
}
}
}
}
function disableControls(inputArray)
{
for (var i=0; i < inputArray.length; i++)
{
findControl(inputArray[i], 0);
}
}
function hideControls(inputArray)
{
for (var i=0; i < inputArray.length; i++)
{
findControl(inputArray[i], 1);
}
}
function hideControlsAfter(input)
{
findControl(input, 2);
}
//Usage:
// disableControls(["Field Name 1", "Field Name 2"..]);
// hideControls(["Field Name 1", "Field Name 2"..]);
// hideControlsAfter("Field Name");
//-->
</SCRIPT>translate(
substring-after(
/my:myFields/my:grpEmployeeInformation/my:managerID,
"\"),
"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"abcdefghijklmnopqrstuvwxyz") !=
translate(
xdUser:get-UserName(),
"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"abcdefghijklmnopqrstuvwxyz")The workarounds presented in this thread suggest the following:
- Rebuild the library or site
- Replace InfoPath’s “Automatically determine security level” with “Domain Security”
- Deactivate/Reactivate the InfoPath Form Template from the Site Collections
I also notice when using the Publish to Sharepoint as a content type that a change to the promoted cols wont take effect until you disable and then re-enable the content type for the site collection.
I was able to deactivate/reactivate with some success (thanks for this work-around!!!). The missing content type columns were added. However, changes to InfoPath property promotion were not reflected...huge bummer!! That leaves me with no other options that to start over…again!
Recently, I had to change my network password at work. This caused a problem which I was struggling to solve: every time I attempted to access the corporate intranet (with the IE setting "Logon automatically with current username/password"), it would prompt me for my password. It worked correctly before my password change, so I figured my password was being cached somewhere.
I attempted to empty the browser cache, restart the machine, relocate the intranet URL to another security zone; all to no avail.
Just today I found a blog post by Nick Porter entitled: SharePoint prompt for password after changing network password. In his post, he states:
Cause:
What seemed to happen was it was storing the old information in the
Password list under the Manage Passwords section under "User Accounts". (Start > Settings > Control Panel > User Accounts)
His resolution was:
1. Click "Start" > "Settings" > "Control Panel"
2. Double click "User Accounts"
3. Click on the "Advanced" tab
4. In the "Passwords and .NET Passports" area click "Manage Passwords"
5. Remove everything there.
Albeit, you do not need to remove *everything* from the managed passwords if other sites are working correctly for you (and you want them to), but I removed the intranet URL, opened a new browser and navigated to the site...and it automatically logged me in!
Thanks Nick Porter.
Enjoy!
--andrew
string MasterUrl = "/_layouts/custom.master";
string CustomMasterUrl = "/_layouts/custom.master";
string AlternateCssUrl = "/StyleLibrary/Custom/CSS/stylesheet.css";
SPWeb web = (SPWeb)properties.Feature.Parent;
try {
web.MasterUrl = MasterUrl;
web.CustomMasterUrl = CustomMasterUrl;
web.AlternateCssUrl = AlternateCssUrl;
web.Update();
}
catch { }SPWeb web = (SPWeb)properties.Feature.Parent;
try {
web.MasterUrl = web.Site.RootWeb.MasterUrl;
web.CustomMasterUrl = web.Site.RootWeb.CustomMasterUrl;
web.AlternateCssUrl = web.Site.RootWeb.AlternateCssUrl;
web.Update();
}
catch { }SPWeb web = (SPWeb)properties.Feature.Parent;
try {
web.MasterUrl = web.ParentWeb.MasterUrl;
web.CustomMasterUrl = web.ParentWeb.CustomMasterUrl;
web.AlternateCssUrl = web.ParentWeb.AlternateCssUrl;
web.Update();
}
catch { }
SPWeb web = (SPWeb)properties.Feature.Parent;
Hashtable hash = web.AllProperties;
try {
web.MasterUrl = web.ParentWeb.MasterUrl;
hash["__InheritsMasterUrl"] = "True";
web.Update();
}
catch { }
try {
web.CustomMasterUrl = web.ParentWeb.CustomMasterUrl;
hash["__InheritsCustomMasterUrl"] = "True";
web.Update();
}
catch { }
try {
web.AlternateCssUrl = web.ParentWeb.AlternateCssUrl;
hash["__InheritsAlternateCssUrl"] = "True";
web.Update();
}
catch { }