The pages which show all variables for a specific realm (e.g. admin/config/system/variable/realm/language/edit) currently do not take into account multiple realms.

  1. Setup site-slogan as multilingual domain variable
  2. Navigate to admin/config/system/site-information and set a site slogan for different language/domain combinations
  3. Navigate to admin/config/system/variable/realm/language/edit: site-slogan is still original value, i.e. values set in previous steps do not show up.
  4. Similarly, saving values on that page seems to only save for the language realm (ignoring the domain realm).

Comments

Jose Reyero’s picture

Status: Active » Fixed

These pages are intended for editing variables for a single realm, so I don't think we should mix multiple realms there.

Fixed related issues #1605670: Realm switcher broken on variable edit pages. Now I think variable/realm/edit pages are working properly.

bforchhammer’s picture

Status: Fixed » Active

These pages are intended for editing variables for a single realm, so I don't think we should mix multiple realms there.

Hm okay. We should probably add respective notes then.... At the moment you can edit union-realm variables in a realm form and respective value may never actually be shown/used on the site if it's being overridden by a union-realm value. Potential source of confusion for the end user.

Or maybe just exclude union realm variables from the "edit realm variables" form, and enable the "edit" page for union realms as well. At the moment it's not possible to edit union values if variabels do not have a respective system settings form somewhere... (I have a few custom variables which fall into that category).

I'm actually not sure how much sense it makes a lot of different pages and forms for the editing very similar sets of variables... Maybe it would be better to have only one page, and add an option to the realm selector which allows to edit "global" values. E.g. add "All languages" to the language realm selector. If a user selects "All languages" and "All domains" this would allow editinig the global default values.

Jose Reyero’s picture

This is not a module for the end user, variables are meant to be edited in settings forms or wherever modules defining the realms want them edited. This is just an option on top of all your site settings forms for administering and hacking variables.

Now we need to make a realease of this variable 2.x to get started with mixed realms, we can think about improving it later. So let me know if there's any bug left or anything else we need for domain_variable to work.

bforchhammer’s picture

So let me know if there's any bug left or anything else we need for domain_variable to work.

I can't think of anything that would block a release... :-)

I think there's two points in this issue which should be addressed eventually, but which I would not consider release blockers, as they both only affect site-admins and don't affect end-users:

  1. Currently it's not always obvious which realms a variable is saved for; it may be confusing to site-admins that it is possible to edit the "global default value" for a variable which is declared as a multilingual domain variable... Which means it's possible to save a variable value which never ends up being displayed.
    • Possible solution: add something like the following to the form element: "This is a multilingual domain variable. You are currently editing the value for english and all domains".
  2. There's currently no UI for editing realm union variables (i.e. multilingual + multidomain values); especially for "administering and hacking variables" this should be possible imo; on a current multidomain+multilingual project I would probably use that form most, because that's the type of variables which I have to come back to and change more often than others.
    • Possible solution: enable the "edit page" for "union realms" in the realm overview page; this should be fairly straightforward, no?

But as I said, in terms of release-blocking I would postpone both of these issues.

bforchhammer’s picture

Hm, and thinking about the idea of adding "all languages" and "all domains" to the realm selector a bit more... I think this could be really useful, as it would allow site admins to edit values for the following combinations all in the same (system settings) form:

  • global default values: "all languages" + "all domains", e.g. set frontpage for all domains and languages is "node"
  • default values for a specific domain: "all languages" + "news.domain.com", e.g. set frontpage for all languages on news.domain.com to "news"
  • default values for a specific language: "german" + "all domains", e.g. set site slogan for german on all domains to to "Deutscher Website-Slogan"
  • values for specific domain and language: "german" + "news.domain.com", e.g. set site slogan to "Deutsche Nachrichten-Übersicht"

This could especially make things a lot easier when a site has a lot of domains or languages and values of a variable are mostly the same across domains/languages... "a lot easier" as in "making editing for site admins more convenient", because it would eliminate the need to go to variable admin pages when settings up "default values".

Again, not a release blocker. ;-)