This board is the new home for david63's extensions.

All of the extensions hosted here will need to be treated as a new install as there is no migration from the original ones to these, and furthermore, no support will be given to migrating to any of these extensions from previous versions.


Due to the selfishness of certain board members it has become necessary to apply a limit of how many downloads each member can make before making a donation. Once a donation has been made then you will have unlimited downloads.

[3.3.0] Delete User PMs

Fully working extensions
User avatar
devspace
Owner
Owner
Posts: 283
Joined: October 2022

[3.3.0] Delete User PMs

#1

Post by devspace »

Delete User PM Data:

Delete all PM data (PMs, folders and rules) for a selected user

Compatibility:

Image Image

Image

Note:

If you are using any other version of this extension then it must be Disabled /Delete data and the original files deleted before installing this version - you will loose all settings.

Features:
  • Option to allow the user to be made non active
Language(s):
  • en
Version:
  • 3.3.0
Installation:
  • Download the latest release and unzip it.
  • Upload the unzipped files to [board root]/ext/devspace/deleteuserpms and enable it in the ACP
Configuration:
  • No configuration required
Useage:
  • Users and groups
  • User utilities
  • Delete user PM data
Extension Download:

User avatar
devspace
Owner
Owner
Posts: 283
Joined: October 2022

Delete User PMs

#2

Post by devspace »

Announcements:

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#3

Post by HiFi Kabin »

Useful looking extension, except that there are errors if I disable, delete data and the enable again (you know me, I'll destroy it if I can :lol: )

Tested locally

3.3.8

7.2.10

User avatar
devspace
Owner
Owner
Posts: 283
Joined: October 2022

Re: Delete User PMs

#4

Post by devspace »

I don't see any errors - what errors are you getting?

User avatar
[Dimetrodon]
Donor
Donor
Posts: 26
Joined: October 2022

Re: Delete User PMs

#5

Post by [Dimetrodon] »

devspace wrote: 22 Oct 2022, 20:55
I don't see any errors - what errors are you getting?
I tested it on localhost with phpBB 3.3.8 with php 8.1.6. Then disabled it, cleared all data, then re-enabled it. I got this error:
Extensions Manager

The Extensions Manager is a tool in your phpBB Board which allows you to manage all of your extensions statuses and view information about them.

Enabling an extension allows you to use it on your board.

Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.

A module already exists: ACP_USER_UTILS


Return to the extension list
This is probably what HiFiKabin was talking about.

Edit: And deleting that module to fix the "module already exists" error results in this:
General Error
SQL ERROR [ mysqli ]

Duplicate entry 'devspace/deleteuserpms' for key 'ext_name' [1062]

SQL

INSERT INTO phpbb_ext (ext_name, ext_active, ext_state) VALUES ('devspace/deleteuserpms', 0, 'b:1;')

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 1023
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 202
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 345
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 179
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 241
CALL: phpbb\extension\manager->update_state()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 209
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()

User avatar
david63
Member
Member
Posts: 16
Joined: October 2022

Re: Delete User PMs

#6

Post by david63 »

This should never happen on a "clean" board - if it is happening then there is something screwed up with the left and right ids in the modules table.

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#7

Post by HiFi Kabin »

:oops: Sorry, I thought I had added the screenshots but forgot.

Yes, those were the errors I am getting. Clean install using Quickinstall, no other extensions added.

Deleted both the module and database key allowed me to add the extension again, but is I disable/delete date/enable I get the same error again.

Just created a fresh board in Quickinstall with a fresh extension download with exactly the same result
Last edited by HiFi Kabin on 23 Oct 2022, 10:12, edited 1 time in total.

User avatar
david63
Member
Member
Posts: 16
Joined: October 2022

Re: Delete User PMs

#8

Post by david63 »

HiFi Kabin wrote: 23 Oct 2022, 10:02
Clean install using Quickinstall, no other extensions added.
Have you actually tried with a clean install without using Quickinstall?

I cannot recreate the error on a clean 3.3.8 board - and this bit of code has been around for years without any problems and affects many of there extensions.

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#9

Post by HiFi Kabin »

Installed phpbb manually on Wampserver with exactly the same errors


Installed on my online test board with exactly the same errors

3.3.8

8.1.11

User avatar
david63
Member
Member
Posts: 16
Joined: October 2022

Re: Delete User PMs

#10

Post by david63 »

Can you post a screenshot of the modules table

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#11

Post by HiFi Kabin »

Database tables? With the extension disabled


screenshot_921.jpg

Edited for clarity
You do not have the required permissions to view the files attached to this post.

User avatar
devspace
Owner
Owner
Posts: 283
Joined: October 2022

Re: Delete User PMs

#12

Post by devspace »

Stupid PHP versions (why can they not leave things alone?????)

Can you try downloading it again - it should work this time

User avatar
[Dimetrodon]
Donor
Donor
Posts: 26
Joined: October 2022

Re: Delete User PMs

#13

Post by [Dimetrodon] »

Got this the second time
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/migrator.php on line 662: Undefined array key 1

Fatal error: Uncaught TypeError: phpbb\db\migrator::get_callable_from_step(): Argument #1 ($step) must be of type array, null given, called in C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php on line 705 and defined in C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php:727 Stack trace: #0 C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php(705): phpbb\db\migrator->get_callable_from_step(NULL, NULL, false) #1 C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php(662): phpbb\db\migrator->run_step(NULL, NULL, false) #2 C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php(437): phpbb\db\migrator->process_data_step(Array, Array) #3 C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php(288): phpbb\db\migrator->try_apply('\\devspace\\delet...') #4 C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php(241): phpbb\db\migrator->update_do() #5 C:\xampp\htdocs\phpBB3\phpbb\extension\base.php(78): phpbb\db\migrator->update() #6 C:\xampp\htdocs\phpBB3\phpbb\extension\manager.php(231): phpbb\extension\base->enable_step(false) #7 C:\xampp\htdocs\phpBB3\includes\acp\acp_extensions.php(209): phpbb\extension\manager->enable_step('devspace/delete...') #8 C:\xampp\htdocs\phpBB3\includes\functions_module.php(676): acp_extensions->main('extensions', 'main') #9 C:\xampp\htdocs\phpBB3\adm\index.php(81): p_master->load_active() #10 {main} thrown in C:\xampp\htdocs\phpBB3\phpbb\db\migrator.php on line 727

User avatar
[Dimetrodon]
Donor
Donor
Posts: 26
Joined: October 2022

Re: Delete User PMs

#14

Post by [Dimetrodon] »

Never-mind, clearing out the extension's data a second time seems to have fixed the issue.

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#15

Post by HiFi Kabin »

New install of phpBB with a fresh download of the extension and I get

Image

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#16

Post by HiFi Kabin »

I was editing the above post when the time ran out

It works perfectly with my on line test board running 8.1.11 ( Install, disable, delete data install all OK ) but will not install with my Local hosted Quickinstall.

User avatar
[Dimetrodon]
Donor
Donor
Posts: 26
Joined: October 2022

Re: Delete User PMs

#17

Post by [Dimetrodon] »

while this is a cool extension, I do not think it is ready for a live board.

User avatar
david63
Member
Member
Posts: 16
Joined: October 2022

Re: Delete User PMs

#18

Post by david63 »

[Dimetrodon] wrote: 23 Oct 2022, 16:49
while this is a cool extension, I do not think it is ready for a live board.
There is nothing wrong with the extension it works perfectly on a live board - the problem is with the install, or to be more exact with the uninstall. This will be fixed shortly.

User avatar
devspace
Owner
Owner
Posts: 283
Joined: October 2022

Re: Delete User PMs

#19

Post by devspace »

The install/uninstall error in this, and other extensions has now been fixed.

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#20

Post by HiFi Kabin »

Excellent, many thanks. I will download and test later

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#21

Post by HiFi Kabin »

I am still getting errors online, locally with Quickinstall on Wamp, and even with a manual install on Wamp

Image

User avatar
devspace
Owner
Owner
Posts: 283
Joined: October 2022

Re: Delete User PMs

#22

Post by devspace »

Sorry - there was a rogue file in the .zip :oops: :oops:

Should be OK now

HiFi Kabin
Member
Member
Posts: 21
Joined: October 2022

Re: Delete User PMs

#23

Post by HiFi Kabin »

enable> disable > Delete data > enable

No errors but I needed to purge the boards cache first otherwise it was throwing all sorts of problems.

User avatar
devspace
Owner
Owner
Posts: 283
Joined: October 2022

Re: Delete User PMs

#24

Post by devspace »

HiFi Kabin wrote: 25 Oct 2022, 12:37
No errors but I needed to purge the boards cache first otherwise it was throwing all sorts of problems.
That is probably a throw back to the other problems.