-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export PMs/Profile data error. #7763
Comments
I'll take a look. EDIT: Oh man, I remember this gnarly query. This is might get ugly before it gets better. |
It seems that there is a way to end up with a mismatch between the number of recipient IDs and the number of recipient names in the query that gets all the PM data in getXmlPMs(). I haven't started working on a fix yet, but I suspect that we'll have to break up that query into two separate ones. |
Is the mismatch due to a deleted account? That would at least make sense why you have more ids than names. |
That's my suspicion, yes, but there could be other ways to get into this inconsistent state. I haven't had a chance to dig into it further, so I can't say at this point. |
I have not been able to reproduce the error yet. I've tried sending PMs to accounts, then deleting those accounts, and then exporting profile data with PMs included, but that doesn't produce the error. It doesn't matter if there was a single recipient or multiple recipients, any number of which were subsequently deleted. All that ever happens is that the deleted recipients are left out of the recipients list, and if there are no existing recipients, then the PM itself is left out of the export. At this point, I am back to square one. 😕 |
I figured it out. It seems that we allow commas in member names, but the query in question concatenates member names using a comma. I checked on simplemachines.org, and there are some registered members that do in fact have commas in their names. At any rate, I should have a fix submitted soon. |
Fixes SimpleMachines#7763 Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Description
These are being logged in the PHP error log
PHP Fatal error: Uncaught ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements in /Sources/News.php:2649
Stack trace:
#0 /Sources/News.php(2649): array_combine(Array, Array)
#1 /Sources/tasks/ExportProfileData.php(242): getXmlPMs('smf', true)
#2 /Sources/tasks/ExportProfileData.php(552): ExportProfileData_Background->exportXml(Array)
#3 /Sources/tasks/ExportProfileData.php(120): ExportProfileData_Background->exportXmlXslt(Array)
#4 /cron.php(249): ExportProfileData_Background->execute()
#5 /cron.php(131): perform_task(Array)
#6 {main}
thrown in /Sources/News.php on line 2649
Steps to reproduce
Environment (complete as necessary)
Additional information/references
These are being logged on SimpleMachines website. No more information is available
The text was updated successfully, but these errors were encountered: