OpenLG Posted August 13, 2012 Posted August 13, 2012 Hi, As the title says, my code looks like this: $aPage = $pages->get('selector'); $default = $languages->get('default'); $language1 = $languages->get('language1'); $language2 = $languages->get('language2'); $aPage->setOutputFormatting(false); $aPage->title->setTrackChanges(true); // remove this and title will be empty $aPage->title->setLanguageValue($default, 'title'); $aPage->title->setLanguageValue($language1, 'title1'); $aPage->title->setLanguageValue($language2, 'title2'); $aPage->save(); The reason I'm asking is I can't find any mention of this in the documentation and it took quite some time to figure out.
ryan Posted August 14, 2012 Posted August 14, 2012 Thanks for finding this elitLG! As you probably guessed, that's not the intended behavior-- you shouldn't have to calls setTrackChanges on your own. Thanks for the good example, I was able to duplicate here as well. I have updated the fieldtypeWakeupValue hook function in LanguageSupportFields.module to have the setTrackChanges(true) so that you don't need to do the above. This is now in the dev branch where it'll run through a little more testing just to make sure there aren't any side effects.
OpenLG Posted August 21, 2012 Author Posted August 21, 2012 Thank you for answering questions so fast
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now