By anya on Thursday, 04 August 2016
Replies 6
Likes 0
Views 1.7K
Votes 0
Translations of events are not published in LanternFish component via frontend.
There is a patch below how to solve it.
Could you please include it into the next JEvents release?

JEvents v.3.4.14
LanternFish v.1.3.8

Steps to reproduce:

1) Follow JEvents > Configuration > Permissions > set Publish/Manage Events = 'Allowed' for tested group (better do not use SuperUser for clean testing)
Enable User Authorization = No
Publish Own = Yes
2) Login your site under the user that has permission to publish events.
3) Open 'Create new event' form. Type title in origin language, Save. Switch to English interface (which is language of translations), type title in English, Save

Expected result: title displays in English if English UI.

Actual result: title displays in original language in English interface.

In the backend of LanternFish translation of title exists but not published.

To solve this problem the following line should be added in JEvents file components/com_jevents/libraries/iCalEvent.php
(lines location 116-121)

$db = JFactory::getDBO();
+ $this->_detail->state = $this->state;
$detailid = $this->_detail->store($updateNulls);
if (!$detailid){
JError::raiseError( 104, JText::_( 'PROBLEMS_STORING_EVENT_DETAIL' ));
Is the issue that Lanternfish sets the published state of the translation based on the value from the detail table?
·
Thursday, 04 August 2016 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes it based on the value from _jevents_vevdetail table.
·
Thursday, 04 August 2016 12:59
·
0 Likes
·
0 Votes
·
0 Comments
·
We don't use this field in JEvents - it was created when JEvents was first written but we chose to set the published stats in the vevent table instead. Can you change your content element file to reflect this?
·
Thursday, 04 August 2016 13:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry I was trying to understand what should i do and failed. Maybe i didn't understand clearly your first questions and replied wrong.
LanternFish uses content elements that reference to jevents_vevdetail table but how and from where LF gets published state i don't know and I need to figure it out.
·
Thursday, 04 August 2016 14:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Our current contentelements file is jevents_vevdetail.xml :

<?xml version="1.0" ?>
<joomfish type="contentelement">
<name>JEvents</name>
<author>Mathis Dirksen-Thedens</author>
<version>1.0</version>
<description>Definition for JEvents Component</description>
<reference>
<table name="jevents_vevdetail">
<field type="referenceid" name="evdet_id" translate="0">ID</field>
<field type="titletext" name="summary" translate="1">Summary</field>
<field type="htmltext" name="description" translate="1">Description</field>
<field type="text" name="location" translate="1">Location</field>
<field type="text" name="url" translate="1">URL</field>
<field type="text" name="organizer" translate="1">Organizer</field>
<field type="text" name="contact" translate="1">Contact</field>
<field type="text" name="extra_info" translate="1">Extra</field>
</table>
</reference>
</joomfish>

If I'm not mistaken the 'state' value stores in jevents_vevent table..
Could you advise how our contentelements file should be changed to refer correctly to state field in the jevents_vevent table?
·
Thursday, 04 August 2016 16:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you check with Klas at Lanternfish?
·
Friday, 05 August 2016 10:59
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post