News:

Wondering if this will always be free?  See why free is better.

Main Menu

2.0.16 Update Test Failure (Modlog.php)

Started by Jayme65, April 08, 2020, 04:48:42 AM

Previous topic - Next topic

Jayme65

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&#91;'force_gdpr'&#93;) && $context&#91;'log_type'&#93; == 3 ? '<br />' . $txt&#91;'modlog_admin_log_gdpr_no_delete'&#93; : '')

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

Looking

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.

Sir Osis of Liver

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 in Emor, do as the Snamors.
                              - D. Lister

Jayme65

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?

Jayme65

Could you please help me to understand what has to be done to solve my problem?

Chen Zhen


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.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Jayme65

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?

Chen Zhen

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.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Jayme65


Advertisement: