new item / langauge selection issue

More
15 years 3 months ago #11311 by rjo
Hello, I still try to figure out what happens. No solution yet, but here are some findings:
In administrator/components/com_flexicontent/tables/flexicontent_items.php store is called twice when I save an item from the front-end. (performance optimisation possible ?, but this is not the issue)
Code:
function store( $updateNulls=false ) { $k = $this->_tbl_key; $frn_key = $this->_frn_key; // Split the object for the two tables #__content and #__flexicontent_items_ext //$type = new stdClass(); $type = & JTable::getInstance('content'); $type->_tbl = $this->_tbl; $type->_tbl_key = $this->_tbl_key; //$type_ext = new stdClass(); $type_ext = & JTable::getInstance('flexicontent_items_ext', ''); $type_ext->_tbl = $this->_tbl_join; $type_ext->_tbl_key = $this->_frn_key; foreach ($this->getProperties() as $p => $v) {
$this->getProperties() shows the default language property and not the language submitted via post.
Code:
// If the property is in the join properties array we add it to the items_ext object if (in_array($p, $this->_join_prop)) { $type_ext->$p = $v; // Else we add it to the type object } else { $type->$p = $v; } }

Update:
After uncommenting line 845 in components/com_flexicontent/models/items.php...
Code:
// set type and language $item->type_id = (int)$typeid; // $item->language = flexicontent_html::getSiteDefaultLang();
...things work much better for me. ;-)
There seems to be an issue with getSiteDefaultLang. I cannot get any debugging information from that function.

Please Log in or Create an account to join the conversation.

More
15 years 3 months ago #11323 by micker
thanks for this return !
maybe some dev can see it and optimize and insert in core files !
try to send your post to kenmc or yopyop by mp
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save