Skip to content
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

Relational / Relational Reversed Field bug / feature #849

Open
ldoliv opened this issue Mar 8, 2018 · 2 comments
Open

Relational / Relational Reversed Field bug / feature #849

ldoliv opened this issue Mar 8, 2018 · 2 comments

Comments

@ldoliv
Copy link

ldoliv commented Mar 8, 2018

Hello,

Using FLEXIcontent 3.2.1.12

At the moment the relational field when using the "non-translatable" the relational reversed doesn't get the items in the currently viewed frontend language if the id of the article is in EN and viewed lang is in PT.

Another way of explaining.
I edit a EN article with related field getting all EN articles, then I save.

Both EN article and associated PT article both have the same value because of "non-translatable".

When rendering the relational reversed field in template if frontend is in EN then no problem. But if frontend is in PT then field value is empty.

It should get the associated PT article, if this is too much trouble then at least the EN article.

In category view, order by relational reversed is not working

Relational field feature:
- Ability to personalize the display of each entry in list for example "{item->title}, {{fieldname}}"

@ggppdk
Copy link
Member

ggppdk commented Mar 9, 2018

Both EN article and associated PT article both have the same value because of "non-translatable".

The 'non-translateable' makes the values saved in the DB to be the same for all items that are
"language associated"

So the parameter has no effect on reverse-relation field,
we should disable it to avoid confusion,

  • i will add an entry in XML definition of the field to indicate that the setting should be disabled

Now, regarding your issue,
in your case is you are trying to show articles that do not match current language

Go to configuration of reverse relation field and open
"Viewing TAB" / "Filter items TAB"
and disable parameter
Same Language Only

@ldoliv
Copy link
Author

ldoliv commented Mar 9, 2018

In the configuration of reverse relation field I have it disabled, it doesn't show the EN article.

The ideal would be: if in relation field "non-translatable" is enable then the relation reversed field should check if the articles have any translations/associations and return the ones in the language the user is currently viewing in the frontend.

If in the relational field I picked article EN with id 100, and I am viewing the site in PT it should give me the PT article with id 102. If there is no associated item in PT then give me the EN article 100.

Essentially that is what the translation/association of items are for is to connect articles that are the "same" but with different languages.

I ask of this because this has the advantage of only having to save the article once, I don't have to go to the PT, DE, ... articles and chose the corresponding articles in those languages in the relational field. I just do it once.
The user shouldn't worry about configuring these connections, this should be transparent and setup only once. These connections are already kept in the database whenever we translate an article they become associated, let's use this.

All of this is the same for both relational field and relational reversed, they must check if there are associted items and return the ones in the language the user is currently viewing in the frontend.

Thank you.

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

No branches or pull requests

2 participants