Contao-Camp 2024
Ergebnis 1 bis 5 von 5

Thema: (solved) Pb with translated_tags

  1. #1
    Contao-Nutzer
    Registriert seit
    07.11.2012.
    Beiträge
    106

    Frage (solved) Pb with translated_tags

    Hello everyone,

    Contao 4.9 / MM 2.1 bundle all + MM_attribute_translatedtag

    I got a multilanguage (fr, en, es) website with a mm_equipe to list the team members. For each member, I need to specify in which countries he can work.

    So I created mm_pays with a translated_text attribute for the country name.

    In mm_equipe, I added a translated_tag Countries linked to mm_pays.

    When I edit a mm_equipe record, i try to add some countries, i got this error :
    Code:
    An exception occurred while executing 'SELECT v.*, r.item_id AS mm_equipe_id FROM mm_pays_ref v LEFT JOIN tl_metamodel_tag_relation r ON (r.att_id=?) AND (r.value_id=v.id) AND (v.nom_pays_ref=?) WHERE r.item_id IN (?, ?, ?, ?, ?) ORDER BY nom_pays_ref ASC' with params ["45", "en", "4", "5", "2", "3", "6"]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'v.nom_pays_ref' in 'on clause'
    What do I wrong (if i do something wrong ) ?

    Thanks
    Geändert von Charled (01.09.2022 um 14:42 Uhr)

  2. #2
    Contao-Urgestein Avatar von zonky
    Registriert seit
    19.03.2010.
    Ort
    Berlin, Rdf
    Beiträge
    9.686
    User beschenken
    Wunschliste

    Standard

    Translated_tags is intended for tables that do not come from MetaModels and where there is a separate row for each language entry.

    The "normal" tags attribute can automatically handle multiple languages if the relation goes to an MM table...

    https://github.com/MetaModels/attrib...tags/issues/19

  3. #3
    Contao-Nutzer
    Registriert seit
    07.11.2012.
    Beiträge
    106

    Standard

    ok. My bad.
    Thanks.

  4. #4
    Contao-Nutzer
    Registriert seit
    07.11.2012.
    Beiträge
    106

    Frage One more thing... ;-)

    Just a last question.

    I've created my 'normal' attribute_tag in mm_equipe.
    In mm_pays, I've added a translated_alias attribute for the alias column. Is it right or I should have used a simple alias_attribute ?

  5. #5
    Contao-Urgestein Avatar von zonky
    Registriert seit
    19.03.2010.
    Ort
    Berlin, Rdf
    Beiträge
    9.686
    User beschenken
    Wunschliste

    Standard

    Zitat Zitat von Charled Beitrag anzeigen
    I've created my 'normal' attribute_tag in mm_equipe.
    In mm_pays, I've added a translated_alias attribute for the alias column. Is it right or I should have used a simple alias_attribute ?
    Normally the selection of a translated alias would be correct for the select field Alias - but for MM 2.1 I would go to a non-translated alias (or just to id)

    Attention with the alias: if the alias is generated from a translated text, then it will change with every language switch.

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •