Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

DatePickerField not popping up calendar


30 Posts   5941 Views


16 September 2009 at 2:10am 4085 Posts

This is bizarre. Shawn, what is the difference in the output of using BaseHref() vs leaving it out in terms of the path it creates in your source code?

When I use something like:


The result in my source code is:

<script src=""></script>

So it shouldn't make a difference. The Requirements class must be thinking that file doesn't exist for some reason.

Just humor me, and get the result of Director::fileExists('jsparty/jquery/jquery.js'); for me. My expectation is that it will come back false.

Shawn Parr

16 September 2009 at 2:20am Community Member, 60 Posts

I know, it is totally crazy.

I changed the DatePickerField.php file to this:

function Field() {
   Requirements::javascript($this->BaseHref() . "jsparty/jquery/plugins/livequery/jquery.livequery.js");
      if(Director::fileExists('jsparty/jquery/jquery.js')) {
         Requirements::customScript("alert('File Exists')");
      } else {
         Requirements::customScript("alert('File does not exist')");

The result was 'File Exists.' I then removed it from there and added it to DataObjectManager.php and got 'File Exists.' Which makes absolutely no sense whatsoever.

If you would like me to do anything else, or format the code differently, please let me know. I'm fairly open for this stuff today, as I'm working on integrating some javascript things and not under specific deadlines today or tomorrow.


19 September 2009 at 4:59am Community Member, 323 Posts


In my case, this error ('jQuery is not defined') was only happening in my 'live' shared host and not in the local WAMP server I use for development. I found it when trying to attach images from the Assets folder to pages through a ImageDataObjectManager: the Assets dropdown was showing up, but selecting a folder did not triggered the loading of the images.

Hope it helps,


19 September 2009 at 5:18am 4085 Posts

Right, I get what the error is and when it happens, but what I'm trying to figure out is why it only happens on some systems. Are there any notable differences between your dev and production environments?


22 September 2009 at 3:30am Community Member, 323 Posts


I don't know what is the relevant information concerning configuration differences, but I know that to install SS in my shared host I have to manually modify some lines of ManifestBuilder (replacing $baseDir with '//'), something related to PHP running in safe_mode with open_basedir = '/'.

Also my local development server is WAMP (WampServer 2.0) and the live one is LAMP, but I don't think it matters.

Best regards,


26 September 2009 at 3:36am 4085 Posts

Well, guys. The fix is in. I've decided to stop wondering why and just go with what works. Thank you all so much for your diligent testing.


19 November 2009 at 5:22am (Last edited: 19 November 2009 5:22am), Community Member, 34 Posts

I also had this issue on Silverstripe 2.3.3 with event calendar r83. I followed the solution at

Thanks for everyone posting and testing this. I guess I should have dug deeper prior to my posting it as a separate problem. Thanks!


24 March 2010 at 12:05pm Community Member, 4 Posts

I am getting the same problem with the DatePickerField not displaying. Javascript errors throw the error "jQuery is not defined".

I am running the following:

-Silverstripe 2.3.7 (was having the same error in 2.3.3 and thought may upgrading would fix it, but no)