Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined $static_sections_string when saving using the advanced panel #2

Open
jools-r opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@jools-r
Copy link
Owner

jools-r commented Dec 12, 2024

Warning on saving bulk settings from the advanced panel.

"Undefined variable $static_sections_string" in /bot_write_tab_customize/bot_write_tab_customize.php at line 815

= L815

The details appear to be saved correctly all the same.

Suggested fix: check for missing string first

if ($static_sections_string) {
    safe_update('txp_prefs', 'val= "'.doslash($static_sections_string).'", html="text_input" ', 'name = "bot_wtc_static_sections"');
}

Note to self:

  • first check the state of sections to be hidden from the dropdown (stored in txp_prefs : bot_wtc_static_sections. These appear to be lost in the process.
  • does this even need saving when processing the advanced settings panel?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant