New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language filter plugin breaks event view #563

Closed
jojo12 opened this Issue Jan 23, 2014 · 9 comments

Comments

Projects
None yet
4 participants
@jojo12
Contributor

jojo12 commented Jan 23, 2014

what does the language field do in jem_event? There is nothing in it. Is it perhaps the reason of problems with the language filter. Is this new in 1.9.5? The problem were not in 1.9.4

@JKoelman

This comment has been minimized.

Contributor

JKoelman commented Jan 23, 2014

@jojo12 it happened due to the change of the front model. The front event-model is in a new format and as Joomla is also using language fields it was added. But better to strip it off for now.

//
didn't you had the problem with the language thing a while back?

@jojo12

This comment has been minimized.

Contributor

jojo12 commented Jan 23, 2014

I think the multilingual theme is a todo for at least JEM 2.0 (J2.5 full compatibility)

@Hoffi1

This comment has been minimized.

Contributor

Hoffi1 commented Jan 23, 2014

Agreed.

To quickly fix the bug language check should be commented out.

To support multilanguage one way could be to also allow "a.language IS NULL" - like some lines above for contact. But additionally language checks must be added to ALL frontned models (and modules/plugins?) to ensure all views are consistent and e.g. lists doesn't show events which are not accessable.

We/I don't use multilanguage so I don't know how this is intended to work on Joomla. Is it required to create each event N times for N languages?

@diesl

This comment has been minimized.

Contributor

diesl commented Jan 23, 2014

@ALL: I changed the header to better describe the problem

I also think we should remove the (multi) language part for now. It would need changes throughout the component to implement, which is not favorable for our goal to release in near future.

Moreover, I think multi language is not a top priority feature, because probably < 5% use it. I would consider J3.x compatibility is more important

@diesl

This comment has been minimized.

Contributor

diesl commented Jan 23, 2014

Citing @JKoelman's solution from the forum

delete/uncomment this line in the event-model (front)

Around line:135

// Filter by language
if ($this->getState('filter.language')) {
    $query->where('a.language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')');
 }

Hoffi1 added a commit that referenced this issue Jan 23, 2014

no language check for events yet, see issue #563
This check is not enough. So commented out as quickfix.
(a) languege field is empty by default so all events would be skipped
(b) but they are shown in lists which don't check language - inconsistent and causes 404 if event is clicked in list
@Hoffi1

This comment has been minimized.

Contributor

Hoffi1 commented Jan 23, 2014

done. 😁

Another idea was not to set this filter (in populateState()) but maybe multilanguage works for contacts (which are Joomla's contacts).

Also have searched for ".language" in all frontend files - this was the only one.

// Edit:
Hmm... the second language block is not related to the contact. Don't know where "contactid2" is for - and why MAX(id) ???

@diesl

This comment has been minimized.

Contributor

diesl commented Jan 24, 2014

Hmm... the second language block is not related to the contact. Don't know where "contactid2" is for - and why MAX(id) ???

It is used in the view to display a link to the author, but the MAX(id) seems strange indeed. I open a new topic
The MAX is used to select only one contact while there may exist multiple contacts for one user

@jojo12

This comment has been minimized.

Contributor

jojo12 commented Jan 24, 2014

I agree it's perhaps for later. I compared event with a joomla article. I see mostly together with featured the language part. So only to hold it im memory.

@diesl

This comment has been minimized.

Contributor

diesl commented Jan 24, 2014

I think we can close this, or is still something left?

@ghost ghost assigned Hoffi1 Jan 24, 2014

@jojo12 jojo12 closed this Jan 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment