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
Reply


12 Posts   2444 Views

Avatar
MarcusDalgren

Community Member, 288 Posts

27 May 2010 at 3:07am

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).

Avatar
Pigeon

Community Member, 243 Posts

28 May 2010 at 11:21pm

Bumping this. I had to add:

Requirements::javascript('sapphire/thirdparty/jquery-livequery/jquery.livequery.js');


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

Any chance of getting this fixed 0:-)

Thanks

Avatar
UncleCheese

Forum Moderator, 4094 Posts

29 May 2010 at 1:48am

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

Avatar
MarcusDalgren

Community Member, 288 Posts

29 May 2010 at 2:21am

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.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

29 May 2010 at 2:55am

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

Avatar
MarcusDalgren

Community Member, 288 Posts

29 May 2010 at 3:57am

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

Avatar
UncleCheese

Forum Moderator, 4094 Posts

29 May 2010 at 4:58am

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!

Avatar
Pigeon

Community Member, 243 Posts

30 May 2010 at 5:40am

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.

Cheers.

Go to Top