You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accessing setting via FormIt hook always yields empty value #186
Hey Mark, I tested it as just a snippet and it also returns no value. I checked the name of the key a million times. If I call it using placeholder, it does render the value.
If I add the key as a placeholder in the template, then the snippet call on the same page also gets the value and outputs it to the modx log. Something weird going on,
If you can email a login to support@modmore.com, with a link to this issue, I'd like to do some debugging to see what might be going on there. Should have some spare time near the end of the week to take a look.
I'm not sure if it's related, but in my case on the Contact-Form the "contact-mail" setting, which is also a ClientConfig-setting wouldn't work, unless I called it un-cached:
Activity
Mark-H commentedon Mar 16, 2021
Definitely checked for typos in the key name? And it does work if you place the same snippet just on the page instead of as a hook?
sonicpunk commentedon Mar 16, 2021
Hey Mark, I tested it as just a snippet and it also returns no value. I checked the name of the key a million times. If I call it using placeholder, it does render the value.
[[++webinar_confirmation_email_text_en]]$emailText = $modx->getOption('webinar_confirmation_email_text_en', null, '');Swapping out the key name with a standard modx system setting returns a value.
sonicpunk commentedon Mar 16, 2021
If I add the key as a placeholder in the template, then the snippet call on the same page also gets the value and outputs it to the modx log. Something weird going on,
Mark-H commentedon Mar 16, 2021
That sure does sound weird. Is this a global setting or a context-specific one that may be affected by #109?
sonicpunk commentedon Mar 16, 2021
Event a simple snippet placed in the template like this returns nothing:
$emailText = $modx->getOption('webinar_confirmation_text_en', null, '', true); return $emailText;but the placeholder does:
[[++webinar_confirmation_text_en]]
Both MODX events are activated on the plugin. The setting is a global setting. We are using language contexts.
Mark-H commentedon Mar 16, 2021
If you can email a login to support@modmore.com, with a link to this issue, I'd like to do some debugging to see what might be going on there. Should have some spare time near the end of the week to take a look.
sebastian-marinescu commentedon Feb 6, 2022
I'm not sure if it's related, but in my case on the Contact-Form the "contact-mail" setting, which is also a ClientConfig-setting wouldn't work, unless I called it un-cached:
Just leaving it here for future problem-solvers.