Servicebase not defined, cannot make ajax call

I added a Calendar widget and some events to a page, which works fine in preview. It does NOT work on the published site though. I get a javascript error dialog with the message

“Servicebase not defined, cannot make ajax call”

What does this mean and how can I remedy it?




Did you configure the delivery tier services for the location you are publishing to? Check the source of the page, or inspect with a tool like Firebug, and confirm the Perc_common_ui.js file is loading.

OK, so things are publishing to the DTS from CM1.
I have a form widget which, if I set it to post to “Local Server”, sends data back to the DTS correctly.
The page in question has perc_common_ui referenced in the head, and it is loading correctly.

In Firebug I can see that a post is being made to http://dts-server:9980/perc-metadata-services/metadata/dated/get with these criteria:
{"criteria":["type = 'page'","perc:calendar = 'the-north'"]}
and the response is: {"events":[]}

Can I send you a URL offline?

I discovered that there was a related issue in our templates. Possibly because they weren’t referencing all the namespaces in the html tag, when publishing to the DTS they were showing as type “NULL”, rather than “page”. THis was also preventing the perc:start_ and end_ dates to percolate out to the DTS

Now the post above comes back with results, which is progress.

I still have the javascript errors though…

Hi Oliver,

Are there any noticeable negative effects stemming from this JS error you’re seeing, or are you just concerned (understandably) that this might be a sign of a larger issue? Also, are there any other widgets on this page that would connect to the DTS server? I’m wondering if some combination of dynamic widgets might be leading to some type of conflict here.

the error manifests as two JavaScript popup windows that have to be clicked out of. So its a proper error. Its related to a calendar widget. It isn’t showing the events it should and isn’t behaving properly.

There is also a page auto index on the page which is working fine, making ajax calls and getting results.

Send me your email if you like and I’ll give you a URL to look it.


I emailed you regarding this.

Thank you.

I had never seen this error before, but for anyone else who runs across it, or something else that seems like odd behavior, check the site or page with a debugging tool in the browser. Chrome and FireFox both have inspection and consoles for viewing script errors built in and FireFox has FireBug available. IE 8 & 9 have the Developer Tools accessed via F12.

Most of the dynamic gadgets in CM1 rely on a utility JS file and the core jQuery library. Both of these script files are included automatically when a gadget needing them is on the page. In addition, CM1 adds global helper functions for Delivery Tier operation to the jQuery object. If you include your own jQuery library, or redefine the jQuery object set by the library you will encounter this error and others because these functions will no longer exist.