Hello,
While updating from 2.0.15 to 2.0.16 I get this error reported in the test window:
Execute Modification ./Sources/Modlog.php Test failed
The edit icon to the left displays 2 lines:
'value' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc']
. (!empty($modSettings['force_gdpr']) && $context['log_type'] == 3 ? '<br />' . $txt['modlog_admin_log_gdpr_no_delete'] : '')
I've downloaded this Modlog.php and searched for those two lines...but they do not exist.
Would you please help me know what I'm supposed to do?
Thanks
If you have mods installed the lines may be altered. Look for similar rather than exact lines to see where they might fit. You can do that by using part of the line that needs to be changed. Whatever you do make sure to backup everything first.
Look for this in two places -
== 3 ? 'admin' : 'moderation') .
For reasons unknown, your browser is displaying html char codes instead of right/left brackets.
Quote from: Sir Osis of Liver on April 08, 2020, 12:39:15 PM
Look for this in two places -
== 3 ? 'admin' : 'moderation') .
For reasons unknown, your browser is displaying html char codes instead of right/left brackets.
When I search directly in the file via cpanel > file manager > edit (instead of downloading the file by FTP) I can find two line including
($context['log_type'] == 3 ? 'admin'
What am I now supposed to do please?
Could you please help me to understand what has to be done to solve my problem?
Liver was trying to tell you that you posted search text containing char code equivalents for square brackets.
The two lines you posted that you are looking for a match are:
'value' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc']
. (!empty($modSettings['force_gdpr']) && $context['log_type'] == 3 ? '<br />' . $txt['modlog_admin_log_gdpr_no_delete'] : '')
Look for those 2 & do your replacements.
Hopefully your replacements are not subbing the square brackets for ascii char codes.
Sorry if I sound stupid but I can't get it.
I can see those lines (written correctly) if I edit modlog directly from within the 'File Manager' in cPanel...so what do I have to do now?
You tell me 'do your replacement'...what replacement?
You should only see the 1st one if the edit did not go through.
The parser attempted to add the second one afterward.
If the line already looks like the replacement shown below, then do not bother because the edit should already be there.
Attach the file if you do not understand.
file: ../Sources/Modlog.php
find:
'value' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc'
replace with:
'value' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc' . (!empty($modSettings['force_gdpr']) && $context['log_type'] == 3 ? '<br />' . $txt['modlog_admin_log_gdpr_no_delete'] : '')
Save the changes.
Thanks!! This time I got it ;)