Hi! We were on 2.0.15 and trying to get up to 2.0.16. After installation, I got a message that it was successful. Logged in. Going back to Admin area to do next upgrade to 2.0.17, I get this:
LainaaAn Error Has Occurred!
syntax error, unexpected 'show_privacy_policy_warning' (T_STRING)
Confirmed that other forum admins also get the same error when they try to access the Admin section. Didn't find anything through search here for this particular error. Any ideas?
Did package manager throw any errors when you installed upgrade? Look in Admin.template.php for this -
if (!empty($context['show_privacy_policy_warning']))
echo '
if (itemID == "gdpr" && itemValueHandle.value == 1) {
alert("' . $txt['core_settings_privacy_policy_warning'] . '");
}';
Thanks, Sir. No errors thrown. That code does not appear in my admin.template.php file. Should I add it?
(Semi-noob - I know just enough to be dangerous)
Don't see how it could not be there at all. Did you try to find 'show_privacy_policy_warning'? Should be a syntax error in that line of code.
I must have mis-typed on my find. Apologies.
There are two references to show_privacy_policy_warning.
['core_settings_switch_on'], '\';';';
if (!empty($context['show_privacy_policy_warning']))
echo '
if (itemID == "gdpr" && itemValueHandle.value == 1) {
alert("' . $txt['core_settings_privacy_policy_warning'] . '");
}';
echo '
if (!empty($context['show_privacy_policy_warning']))
echo '
if (itemID == "gdpr" && itemValueHandle.value == 1) {
alert("' . $txt['core_settings_privacy_policy_warning'] . '");
}';
Duplicate code. Should look like this -
// Change the image, alternative text and the title.
document.getElementById("switch_" + itemID).src = \'', $settings['images_url'], '/admin/switch_\' + (itemValueHandle.value == 1 ? \'on\' : \'off\') + \'.png\';
document.getElementById("switch_" + itemID).alt = itemValueHandle.value == 1 ? \'', $txt['core_settings_switch_off'], '\' : \'', $txt['core_settings_switch_on'], '\';
document.getElementById("switch_" + itemID).title = itemValueHandle.value == 1 ? \'', $txt['core_settings_switch_off'], '\' : \'', $txt['core_settings_switch_on'], '\';';
if (!empty($context['show_privacy_policy_warning']))
echo '
if (itemID == "gdpr" && itemValueHandle.value == 1) {
alert("' . $txt['core_settings_privacy_policy_warning'] . '");
}';
echo '
// Don\'t reload.
return false;
}
Did you install the patch twice?
That worked!
I didn't install the patch twice. Strange.
Thank you for your quick help! I appreciate it.