Normal behaviour

When multilang syntax is used inside of Views labels, according to what it is intended to, the [multi] tags must:

  1. be hidden when in HTML result (view summary, preview), i.e. replaced by the current language translation
  2. stay visible when in View definition forms, where it is up to the user to enter all desired translations

Problem

Currently all is working fine except when opening first definition form for a given language, where labels are displayed like in point 1 above.

After that, any other form (including the faulting one) displays right, till we change the current language. Then the issue appears anew only once, and so on.

Context

This relies to multilang_exit() hook in multilang.module, where the behaviour is driven by this pretty simple test:

if (strpos($content, '"command":"insert"'))

The "insert" command points out contents which are not part of a definition form, so they must be processed, while other contents stay unchanged. Currently I can't figure out why it is not the case of the first form even opened for a given language: we can just notice that so, it is the first Ajax request since the whole page was loaded. Any suggestion welcome...

Comments

cfreed’s picture

Status: Active » Closed (fixed)

The first time Views sends an Ajax request for getting a viewdSetForm, returned data includes a "command":"insert" (which data is a <script>).
So we changed the way Multilang works: it previously processed whole returned data if a "command":"insert" was found, now it decodes the JSON returned, looks at its content for any "command":"insert" and processes its own data part only.

Fixed, released in 7.x-2.1.