new item / langauge selection issue

More
15 years 9 months ago #6122 by raramuridesign
Hi all and support

We have encountered a bug when languages are involved.

When A new item is created then the item does not save with a default language.

See below for the steps and the error. If anyone has a solution please share.

1. click new item
2. the issue, no language is chosen by default then after saving the view is corrupt.

following error
Fatal error: Cannot access empty property in /home/xxx/public_html/xxx/administrator/components/com_flexicontent/views/items/tmpl/default.php on line 469

Would be greatful for a speedy reply on this one...
Matthew

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

More
15 years 9 months ago #6319 by ditmedie
I, more or less, have the same problem. It appears when Joomfish support is turned on in the global config. After it is turned on my list of items is all messed up..

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

More
15 years 9 months ago #6328 by raramuridesign
Hi
yes thats the exact issue.
I have trawled through the code and cannot find where this is set. All we need is the default language to be selected and this will solve the issue.

Matthew

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

More
15 years 9 months ago #6368 by opolette
Hi

I have exactly the same problem with Flexicontnt 1.5.2 and Joomfish 2.0.4

I had my site in a language. I installed Joomfish. I activated "Joomfish support" in Flexicontent General config and kaboom, "Fatal error : Cannot access empty property in com_flexicontent\views\items\tmpl\default.php on line 469"

:-(

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

More
15 years 9 months ago #6370 by opolette
Hi,

Here is a Quickfix.
Replace the code between lines 469 and 475 in flexicontent 1.5.2 by the following. It will at least allow you to display correctly content views et edit content (and change accordingly the language in the upper section of the content)
Code:
<?php if (isset($this->langs->{$row->lang})) { $itemLangName=$this->langs->{$row->lang}->name; $itemLangImage=$this->langs->{$row->lang}->image; $itemLangShortCode=$this->langs->{$row->lang}->shortcode; } else { $itemLangName=""; $itemLangImage=""; $itemLangShortCode=""; } ?> <td align="center" class="hasTip col_lang" title="<?php echo JText::_( 'FLEXI_LANGUAGE' ).'::'.$itemLangName; ?>"> <?php if ($itemLangImage) : ?> <img src="../images/<?php echo $this->langs->{$row->lang}->image; ?>" alt="<?php echo $row->lang; ?>" /> <?php else : ?> <img src="../components/com_joomfish/images/flags/<?php echo $itemLangShortCode; ?>.gif" alt="<?php echo $row->lang; ?>" /> <?php endif; ?> </td>

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

More
15 years 9 months ago #6382 by raramuridesign
Hi
Silly question, but which file did you edit ?

Matthew

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

More
15 years 9 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
15 years 9 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
15 years 4 months ago - 15 years 3 months 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: 15 years 3 months ago by rjo.

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

More
15 years 3 months 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.

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