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

LiveQuery not being required properly?

Go to End

12 Posts   2394 Views


27 May 2010 at 3:07am Community Member, 288 Posts

Hi UncleCheese!

I'm running the latest checkout of DOM together with the latest checkout of branches/2.4 and started getting errors about livequery not being a function. It's worked before I updated so I'm wondering if something's changed in your code or in theirs?

Anyways the to fix this for me was to make sure that DataObjectManager requires the file in the __construct() function and that DatePickerField requires it in its Field() function (in case DatePickerField gets used on a page that doesn't have the DOM on it).


28 May 2010 at 11:21pm Community Member, 243 Posts

Bumping this. I had to add:


to line 115 of DataObjectManager.php as a temporary fix.

Any chance of getting this fixed 0:-)



29 May 2010 at 1:48am 4085 Posts

What version of SS are you guys running? I can't replicate this.


29 May 2010 at 2:21am Community Member, 288 Posts

I'm running on the latest SVN checkout from branches/2.4 and the 398 release of DOM. Everything was working until very recently and if I remember correctly it happened after an SVN update from branches/2.4 and not when updating the DOM. I'm not sure though.

Anyways shouldn't the datepicker field require livequery just in case the DOM isn't loaded on a page using it? datepicker_init.js is depending on it being there. I'll hopefully have time to do some digging and see if I can figure out what and how this was caused.


29 May 2010 at 2:55am 4085 Posts

Until a recent rev of SS 2.4, livequery was bundled in with LeftAndMain, so that's the reason it's omitted.


29 May 2010 at 3:57am Community Member, 288 Posts

So is that recent rev the reason we're getting the error in the DOM as well?


29 May 2010 at 4:58am 4085 Posts

Yeah, most likely. There was a recent changeset that said livequery had been removed from LeftAndMain because it was not used in CMSMain or AssetAdmin..

Can you confirm that if you add Requirements::javascript(THIRDPARTY_DIR.'/jquery-livequery/jquery.livequery.js'); to the DOM constructor and the DatePickerField::FieldHolder() method that everything works as expected? I don't have any trunk versions of SS set up.

Dependency management is such a headache!


30 May 2010 at 5:40am Community Member, 243 Posts

There is no FieldHolder() function for DatePickerField, so i added the requirement to Field() instead (line 70)

I also added the requirment to line 115 of DOM class and both work fine now - though i will not i dont use the date picker field much so havent had a huge test.

Lastly, i'm not running trunk, i'm running the 2.4 branch (like Smurkas). So this isn't an entirely fringe issue.


Go to Top