processwire-issues icon indicating copy to clipboard operation
processwire-issues copied to clipboard

Missing language Tab if another field with name ending with the other language name

Open lparikka opened this issue 1 year ago • 3 comments

Short description of the issue

Having a multi-language field called public_title of type "Text (Multi-Language)", languages default and en and another field called public_title_en of type "Text", the public_title fields Tabs are missing the English tab.

Expected behavior

There should be both Default and English tabs in the admin in the field public_title (Julkinen otsikko)

Actual behavior

There is only the Default tab and no way to edit the English content of the field.

Optional: Screenshots/Links that demonstrate the issue

The field with name public_title_en:

missing

The field with name changed to public_title_english:

notmissing

Optional: Suggestion for a possible fix

Problem might be in the "Language Support - Tabs" module, but I did not try to fix it.

Setup/Environment

  • ProcessWire version: 3.0.229
  • PHP version: 8.1
  • LanguageTabs 1.1.7

lparikka avatar Jun 05 '24 07:06 lparikka

@lparikka It sounds like your field naming might be colliding with PW's built-in Language-alternate field support?

https://processwire.com/docs/multi-language-support/multi-language-fields/#language-alternate-fields

ryancramerdesign avatar Jun 07 '24 16:06 ryancramerdesign

@lparikka, does Ryan's answer explains your situation? Can you close this issue?

matjazpotocnik avatar Jul 05 '24 16:07 matjazpotocnik

Yes, this explains and fixed the problem. I just think if the tab should not be marked as Default or if there should be some kind of error telling, that the English-tab can not be show because of the colliding field?

lparikka avatar Jul 05 '24 18:07 lparikka