Context Settings in 3.x

Modx 3.0.3

I’m attempting to setup a new context on an existing Modx installation. I did this several years ago but it took my many tries to get it working. So I’m trying to use that as a model for setting up this domain.

I’ve created the context. I’ve installed XRouting.

As I go into the context settings to add the various settings, the key dropdown field doesn’t have the required keys. If I start typing base_url the dropdown doesn’t show that as a choice?

I must be missing something obvious. I’m stuck.

image

Just manually put in the desired key (“base_url” in this case). It doesn’t have to be a value from the dropdown list.

I suppose the list in the dropdown shows existing system settings, that you could override in the context. But there (usually) doesn’t exist a system setting “base_url”, as the value of this setting (and some others) are set in the config file (core/config/config.inc.php).

Yep, I tried that and it changes the key to tiny.base_url. Just tried it again. Same.

Then it’s probably a bug in the user interface.
You may have to change the key directly in the database table modx_context_setting (and then clear the cache).

I did a test in MODX .3.0.3, and when the dropdown list is visible and I hit tab or enter, it will take the selection from the dropdown list.

However, when I close the dropdown list manually before leaving the field (or use the mouse button to select the next field), I’m able to enter any value.

But the user experience is definitely not ideal.

Thank you!

That works. Very odd. But it works.