• Welcome to Simple Machines Community Forum. Please login or sign up.

2.0.16, error removing entries admin log

Started by a10, December 28, 2019, 07:33:20 AM

Previous topic - Next topic

a10

December 28, 2019, 07:33:20 AM Last Edit: December 28, 2019, 07:59:31 AM by a10
When trying to clean out old entries occured in 2.0.15:

Apply Filter: Only show the error messages of this URL
https://www.xxx/forum/index.php?action=admin;area=logs;sa=adminlog;type=3
Apply Filter: Only show the errors with the same message
Database error, given array of string values is empty. (uneditable)
Function: ViewModlog
Apply Filter: Only show the errors from this file
File: /customers/xxx/httpd.www/forum/Sources/Modlog.php
Line: 95


Line 95 for individual, line 78 for 'remove all'
(ps, running php 7.3, all worked with 2.0.15)

edit: tested with php 7.2, same.
2.0.18, ssl, php 7.4.23, 10.3.30-MariaDB<br />Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

shawnb61

I cannot replicate this. 

Were there any errors encountered when applying 2.0.16?

Mods installed?

Can you show the lines of code you have around 78 & 95 in Modlog.php?

Also show lines of code ~62 & 63 in Modlog.php?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

a10

No errors in install. Mods listed in signature. Modlog attached.
2.0.18, ssl, php 7.4.23, 10.3.30-MariaDB<br />Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

shawnb61

Somehow that matches the 2.0.15 version exactly.  No changes were applied to this file at all.  THAT doesn't make sense... 

Attached is the 2.0.16 equivalent.  You should be able to just swap out the file since there were no changes in your 2.0.15 version.

Hope this helps. 

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

a10

December 28, 2019, 02:55:19 PM #4 Last Edit: December 28, 2019, 03:12:16 PM by a10
Applied that modlog, still the error & entries not going away. Approx 20 entries.

Wondering if it's only the old entries from 2.0.15, and any new ones from 2.0.16 will be deletable.
Can produce some fresh entries, can the 24h 'lock' be removed so I can test immediately?
$context['hoursdisable'] = 24;  ...would 0 produce any explosions? :O)

Edit: did the above, same with fresh .16 entries as old from .15
"Database error, given array of string values is empty. (uneditable)"

And btw same problem with Moderation Log.


2.0.18, ssl, php 7.4.23, 10.3.30-MariaDB<br />Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

shawnb61

Confirmed.  It's a bug. 

GDPR OFF, but mod & admin log ON, you will get this trying to clear your log.

I'll move this to the Bug Reports board.

THANX for the report. 

Logged as #102
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

a10

Thanks for following up. ftm can delete stuff in db table if needed.
2.0.18, ssl, php 7.4.23, 10.3.30-MariaDB<br />Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

shawnb61

The part that baffles me that the file attached above is from 2.0.15...   :o

You're clearly running 2.0.16 code, though, as those line #s wouldn't otherwise make sense. 

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

a10

Argh :o  was a modlog from the files backup taken right before installing .16
So that clears up that part. Sorry for the confusion, good spotting from your side.

And tested with enabled gdpr, all is indeed well, quite special interaction :)

2.0.18, ssl, php 7.4.23, 10.3.30-MariaDB<br />Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

m4z

Also applies to Moderation log entries:
QuoteDatabase error, given array of string values is empty. (uneditable)
Function: ViewModlog
Apply Filter: Only show the errors from this file
File: /home/rootpath/public_html/smfpath/Sources/Modlog.php
Line: 80


Edit: I see the fix already includes this. <3
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!
<werbung>Meine Freundin hat ihr erstes Buch veröffentlicht!</werbung>

Vanomas

I also can confirm this for admin and moderator log even after 24 hours.
SMF 2.0.17
MySQL: 5.7.17
PHP: 5.6.3

BillLeeDee

Same error with clean install of 2.0.17. Glad I left my directory of 2.0.15 to go back to.

Scooter Trash

Is there a fix for this yet?

If not, which database table/s are the moderation log and administration log located in?

shawnb61

There is a fix for this coming in 2.0.18. 

In the meanwhile, if you have very high volume activity in these logs & really need to clear them out occasionally, the following should work.  (Me, I'm just waiting for 2.0.18 myself...)

DELETE FROM `smf_log_actions`
WHERE id_log IN (2,3)
AND action NOT IN ('agreement_updated', 'policy_updated');


Notes:
- This will delete them regardless of time
- id_log of 2 = mod log; 3 = admin log
- You may need to change the table prefix to match your forum setting
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Scooter Trash

Quote from: shawnb61 on April 02, 2020, 02:09:27 PM
There is a fix for this coming in 2.0.18. 

In the meanwhile, if you have very high volume activity in these logs & really need to clear them out occasionally, the following should work.  (Me, I'm just waiting for 2.0.18 myself...)

DELETE FROM `smf_log_actions`
WHERE id_log IN (2,3)
AND action NOT IN ('agreement_updated', 'policy_updated');


Notes:
- This will delete them regardless of time
- id_log of 2 = mod log; 3 = admin log
- You may need to change the table prefix to match your forum setting

Thanks Shawn.


aED


m4z

"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!
<werbung>Meine Freundin hat ihr erstes Buch veröffentlicht!</werbung>

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: