new item / langauge selection issue

More
14 years 6 months ago #6385 by opolette
Well..
administrator\com_flexicontent\views\items\tmpl\default.php

where the error took place !

"Fatal error : Cannot access empty property in administrator\com_flexicontent\views\items\tmpl\default.php on line 469"

Regards

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

More
14 years 6 months ago #6396 by raramuridesign
Hi
thanks for that...
did you not possibly look at the editing area, where the language is set ?

I think it will be better to edit this than the actual list of items ...

Matthew

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

More
14 years 2 months ago - 14 years 1 month ago #10229 by rjo
Hello, I just encountered the same issue (1.5.3c stable, r354).

Instead of applying the above patch, I went to the database to check what's wrong.

The error happens to me when an item has been saved/applied without specifying the language (and JoomFish integration is activated).

You may update the database and complete the "language" colum in the jos_flexicontent_items_ext table for all items with no language specified.

Of course it would be preferable if onsave validation would prevent that incomplete records can be saved.

HTH, rjo

Update: No, it also happens when the language has been correctly selected before saving.
Last edit: 14 years 1 month ago by rjo.

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

More
14 years 1 month ago #10967 by patal
I also had this problem, and I solved this by installing the Art Adminer component. After installing you go to the jos_flexicontent_items_ext tabel and choose select table.

Then search for language (use like) and leave the input field empty.

Your result should be all rows without language id filled.

Then you can edit the row and fill in the language id manually, for dutch this is nl-NL for instance.

Then you save the row and that will do the job!

My question is if it is possible to solve this problem in flexicontent, so you can select a default language.

THANKS

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

More
14 years 3 weeks 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
14 years 3 weeks 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
Time to create page: 0.419 seconds
Save
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