Bug tracker
Problem exporting to XML sent private messages to deleted user (fix completed in vcs)
A sends to B a private message.
B get's deleted.
A wants to export his sent private messages.
It fails with the following error message:
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_pm_viewfolder.php on line 408: Invalid argument supplied for foreach()
I upload a simple workaround patch.
I, also, upload a Selenium IDE script to demonstrate the problem. Please, keep in my mind that you may need to change the relative URL of your local test phpBB installation (currently it is set to /phpbb/phpBB/ on line 16). Also, you need to disable CAPTCHA from your administration control panel in order to automate the user creation procedure. Finally, you need to have an administrator account with credentials admin:123456 or you need to alter the script.
Comments / History
prekageo wrote:did you follow the instructions by hand or by the Selenium test script?
By hand as I already had an established test board setup with sqlite as the backend. I simply used my existing users and followed the steps as you outlined.
Yes.prekageo wrote:Did you finally got an XML output?
The recipient name.prekageo wrote:What was inside the recipient tag?
One thing that I tested right now is that if I manually enter an error_condition(E_ERROR) before the offending foreach I do not get the error message but the XML does not have recipient tags.
One more thing that I tested is that if you delete a user and then immediately create a new one under sqlite the new user will take the old's user PK and everything will look fine (especially if you use the same user name). I have filled a bug report for this behaviour: http://www.phpbb.com/bugs/phpbb3/51045
P.S. You said that you get the recipient user name in the exported XML. I really wonder how is that possible since after deleting the recipient from the admin panel and doing an sqlite .dump I cannot find his name anywhere (except from the phpbb_log table)! Are you sure that you delete the recipient of the private messages? You could try to do a .dump and check if you find the deleted username.