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

[com-fields] Some questions to @laoneo #12659

Closed
infograf768 opened this issue Oct 31, 2016 · 18 comments
Closed

[com-fields] Some questions to @laoneo #12659

infograf768 opened this issue Oct 31, 2016 · 18 comments

Comments

@infograf768
Copy link
Member

@laoneo

I am trying to solve the most obvious issues in com_fields. See PRs.
There are 2 aspects I do not understand;

  1. language
    Why do you even care for languages concerning fields?
    What is its use and did you know that on a multingual site Field Groups (as they are de facto Categories) can be associated which is, at what I see, totally useless.

screen shot 2016-10-31 at 14 36 09

  1. Modals
    You have created modal templates and I see no use for them.

I guess, before we go on patching, that we need replies on these matters.

@laoneo
Copy link
Member

laoneo commented Nov 1, 2016

  1. Language
    The association is not needed for groups, is there a way to hide them as there are basically com_categories.
  2. What for modal templates are you talking about. Please post a screenshot or a link to the source file that I can properly answer your question.

Feeling a bit strange that you post these questions after we merged it into staging after 9 months of development time in it's own repository. Should probably have done better marketing that more people would recognize that we are planing to integrate DPFields into core. 😬

@alikon
Copy link
Contributor

alikon commented Nov 1, 2016

it's not so strange that people have question now after merge

better late than never

@infograf768
Copy link
Member Author

@laoneo This was merged real fast and I had not looked at it before (we have hundreds of PR, the most important to me being bugs and language matters).

In any case. I do NOT see the use of language, even for fields, not only field groups/categories.

Concerning the modals, here is your component tree:
screen shot 2016-11-01 at 08 22 13
It looks to me that it is a sort of copy/paste from other components as I could not find where these modals are used (some using forcedlanguage which is ONLY used in multiligual sites with specific calls).

@alikon
Copy link
Contributor

alikon commented Nov 1, 2016

just another 'strange' question

can you clarify the usefulness of this two fields on #__fields table

  • version
  • hits

@infograf768
Copy link
Member Author

@laoneo
Also, please look at
#12656

We have to allow translation of the label, the description, the hint if desired

@laoneo
Copy link
Member

laoneo commented Nov 1, 2016

The field has a language parameter, because when an article belongs to a language, then only fields are displayed which do belong to the same language.

@alikon this can be removed, they come indeed from com_categories. In an earlier version of com_fields, I had the version part working but it broke somehow during development more information can be found here joomla-projects/custom-fields#54.

@laoneo
Copy link
Member

laoneo commented Nov 1, 2016

@infograf768 I guess the modals can be removed as well.

@infograf768
Copy link
Member Author

The field has a language parameter, because when an article has belongs to a language, then only fields are displayed which do belong to the same language.

Where is the code for this please?

@laoneo
Copy link
Member

laoneo commented Nov 1, 2016

Here https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_fields/helpers/fields.php#L86. But would be great if you can test it as well as I was the only one who tested that functionality I guess.

@infograf768
Copy link
Member Author

@laoneo
It works, once the language is set for the article (did not test for users or contacts.
Nevertheless, this should ONLY work when the site is multingual, i.e. you should add a conditional
if (JLanguageMultilang::isEnabled())

@infograf768
Copy link
Member Author

Also, if the language is changed, the custom Field still displays.
We need some ajax magic here.

@laoneo
Copy link
Member

laoneo commented Nov 1, 2016

It is really hard with ajax. What I did when the category of an article is changed to reloaded the page, doing the same when the language is changed would be the safest option.

@infograf768
Copy link
Member Author

OK, let's do things one after another
Can you make a PR to take care of

  1. modals
  2. version, hits
  3. use if (JLanguageMultilang::isEnabled())
    and then we will go on

@laoneo
Copy link
Member

laoneo commented Nov 1, 2016

Done. Can you please change the title of the issue to something more meaningful. Thanks for testing hard com_fields.

@infograf768
Copy link
Member Author

I can close it if you like.
remains the categories associations issue

@laoneo
Copy link
Member

laoneo commented Nov 1, 2016

Any clue how to fix that one?

@infograf768
Copy link
Member Author

I have a PR. Will post asap.

@infograf768
Copy link
Member Author

See #12681

Will close this one.

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

4 participants