directus/v6-archive

Translation alias not behaving properly

Offen

#13 geöffnet am 25.10.2018

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (4 Forks)auto 404
2. CriticalInterfaceRelationalbughelp wantedv6

Repository-Metriken

Stars
 (2 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

From directus created by Vlasterx : directus/directus#1940

Version Info

  • Directus version and branch: master branch (6.11.2017.)
  • PHP version: PHP 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 (cli)
  • MySQL version: 5.7.20-0ubuntu0.16.04.1 - (Ubuntu)
  • Web server: (Ex. Apache, nginx or IIS?) Apache/2.4.29 (Ubuntu)
  • OS name and version: Ubuntu server 16.04.3 LTS

Expected Behavior

Based on this tutorial.

I have 3 tables in this setup:

languages articles_translation articles
code [primary key, varchar] id [primary key, int] id [primary key, int]
code_short [varchar] language_code [varchar] translation_id [translation alias]
name [varchar] article_id [int] reference_name [varchar]
sort title [varchar] date_created [datetime]
status content [wysiwyg full] sort
status status

Languages table is filled with 2 different language data. translation_id from table articles is set as translation alias, as in provided tutorial. When new article is created, I expect 2 rows to be filled in articles_translation for each language where language_code is filled with code values from languages table.

Actual Behavior

Three rows are created in articles_translation table. First insert has language_code in numerical value 0. If system status is set, it also unexpectedly influence how rows are created.

Steps to Reproduce

  1. Create tables from Directus as described in Expected Behavior
  2. In table articles create new record
  3. Check articles_translation for results

Schema Dump, Logs, or Screenshots

Provided in Expected Behavior

Contributor Guide