References to deleted accounts prior to 3.4.1 not migrated

405
Defect
-
3.4.2
3.4.1
Install/Upgrade
Fixed
Normal
Normal
3 years ago
3 years ago
0

Description

Ticket #380 was raised to gracefully handle account deletions in relation to old references.

Traq 3.3 was meant to resolve this issue by pointing these references to the Anonymous user account.

As far as I can tell (at least on my installation), this version and subsequent updates through 3.4.1 do not resolve the issue.

The following pages can still be viewed to see the load failures on 3.4.1 + Ticket #404 Code Change:

Ticket History

3 years and 9 months ago by Jack

  • Changed Status from New to Investigating

Do the tickets and timeline events causing the errors have the same user ID as the anonymous user ID?

3 years and 9 months ago by Jamie R. McPeek

Grabbed the row from the database. Here are the current values.

Settings:

(
'anonymous_user_id',
'30'
)

Ticket Owner Deleted Pre-3.3:

(
381, /*id*/
75, /*ticket id*/
'Summary', 
'Body',
0, /*user id*/
2, /*project id*/
... /*snip*/
)

3 years and 9 months ago by Jack

  • Set Component to Install/Upgrade

This could be caused from the upgrade process failing on the part where it calls the Fixes class/helper, or did this happen after a successful upgrade?

3 years and 9 months ago by Jamie R. McPeek

I dropped the database and restored with my backup from 3.2.2, made the change documented in Ticket #404 to remove the fetch(), and re-upgraded to 3.4.1 without any error during the upgrade.

User ID of 0 was present both prior to the update and after.

If it's something really off at this point, I can manually move over broken references to point to the Anonymous account since I assume this issue will be resolved for all new installations going forward.

3 years and 9 months ago by Jack

The Fixes helper should now also update rows with the user ID of 0. Can either update the rows yourself or re-run the upgrade.

3 years and 9 months ago by Jamie R. McPeek

Made the changes per your commit. Dropped database, re-upgraded from 3.2.2 to 3.4.1.

References to user_id = 0 successfully replaced with anonymous_user_id and broken pages no longer present.

3 years and 9 months ago by Jack

  • Closed ticket as Fixed