Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-8670 now.

Problem exporting to XML sent private messages to deleted user (fix completed in vcs)

Let's say we have 2 users A and B.
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

Posted by narqelion (I've Been Banned!) on Sep 9th 2009, 01:39

I have a clean 3.0.5 test board running the same versions w/sqlite db and could not recreate the error.

Posted by prekageo on Sep 9th 2009, 06:25

Do you have E_NOTICE enabled in your error_reporting? If yes, did you follow the instructions by hand or by the Selenium test script? Did you finally got an XML output? What was inside the recipient tag?

Posted by narqelion (I've Been Banned!) on Sep 9th 2009, 16:23

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. :)
prekageo wrote:Did you finally got an XML output?
Yes.
prekageo wrote:What was inside the recipient tag?
The recipient name.

Posted by prekageo on Sep 9th 2009, 17:22

I am puzzled. I can reproduce it here on my local machine. And I also have encounter it to a public phpBB installation (running MySQL though).

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

Posted by narqelion (I've Been Banned!) on Sep 9th 2009, 20:24

I do not know what to tell you other than I was unable to reproduce it. Perhaps someone else can. Are you running a clean install of 3.0.5 with no MOD's and the default prosilver style?

Posted by prekageo on Sep 10th 2009, 10:52

Totally fresh. I have just installed it from svn tags/3.0.5. I have not installed any MODs since I just wanted to reproduce the specific bug that I had encountered in a public forum.

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.

Edited post #182545

Action performed by prekageo on Sep 10th 2009, 10:52

Posted by Kellanved (Former Team Member) on Sep 10th 2009, 12:51

I can reproduce the issue, thanks for the detailed instructions. I think that this is more of a bug in user deletion than in the export itself.

Edited post #182555

Action performed by Kellanved (Former Team Member) on Sep 10th 2009, 12:51

Linked ticket with changeset: r10136

Action performed by Kellanved (Former Team Member) on Sep 11th 2009, 13:53

Changed ticket status from "New" to "Fix completed in SVN"

Action performed by Kellanved (Former Team Member) on Sep 11th 2009, 13:54

Linked ticket with changeset: r10137

Action performed by Kellanved (Former Team Member) on Sep 11th 2009, 13:56

Changed ticket status from "Fix completed in SVN" to "Fix in progress"

Action performed by Kellanved (Former Team Member) on Sep 11th 2009, 14:39

Posted by Briani on Sep 11th 2009, 15:53

you dont mean that, 3.0.7 is months away

Ticket details

Related SVN changesets