Getlistitems turns a specific domain url into relative link, but any other domain is fine.

Sep 27, 2011 at 10:33 PM
Edited Sep 27, 2011 at 10:33 PM

This is the most bizarre inexplicable behavior yet. I have two sites: the SP holding all the lists and another IIS Site which runs the get list items.  I have getlistitems running on a completely blank page to ensure no other scripts are conflicting. One of my fields, "Body" is a rich text edited field and may contain hyperlinks. All hyperlinks work fine except for when I type in the hosted SP domain url (uhc-ss) as a link.

When I do this; the "uhc-ss" gets replaced with a relative server path: ex: uhc-ss.unh.com/sites/file.doc becomes homedev.unh.com/sites/file.doc on homedev.unh.com. This happens when the page renders the getlist items on the IIS server. If I go into the SP and modify the link to uhc-s, uhc-,-ss,uhc-s or c-s none of those values get replaced during rending. It's only uhc-ss; which means that my users cannot attach any files to the SP item because the links will then become broken. Yet anything other than uhc-ss works but its loo late for me to do a DNS switch.

Does anyone have any idea why in the world one specific url would not be getting rendered out and replaced by a relative path? Thanks for any help anyone has.

Also as a note the domain link does work when it is a standalone hyperlink column. The uhc-ss only gets replaced from within a multiline field. So bizarre.

$().SPServices({
   operation: "GetListItems",
   // Force sync so that we have the right values for the child column onchange trigger
   async: false, 
   webURL: "http://uhc-ss.uhc.com/sites/TD/SLT/",
   listName: "CMS-Ops-Home",
   // Filter based on the currently selected parent column's value
   CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Body' /></ViewFields>",
   CAMLQuery: "<Query><OrderBy><FieldRef Name='Order0' /></OrderBy><Where><And><Eq><FieldRef Name='Visible' /><Value Type='Text'>Yes</Value></Eq><Eq><FieldRef Name='Page_x0020_Section' /><Value Type='Text'>Main</Value></Eq></And></Where></Query>",
   //CAMLRowLimit: "4",
   completefunc: function (xData, status) {
    $(xData.responseXML).find("[nodeName='z:row']").each(function() {
     //alert(xData.responseText);
     var Html = "<li style=\"margin-bottom: 1em;\"><strong>" + $(this).attr("ows_Title") + "</strong>" + $(this).attr("ows_Body") + "</li>";
     $("#mytab1").append(Html);
    });
   }
   });//End SPServices Call

Sep 28, 2011 at 5:52 AM

If you are running MOSS, you may be experiencing the AAM rewrite bug. Read http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=57 and see if this might be the cause. Apparently this was fixed in 2010.

Sep 28, 2011 at 3:47 PM

Eagle, that looks like the culprit to me. Unfortunately on this SP I am not given that control but I will advise them on this. Thank you for sending that info my way!