p2 breathe – orphan comment breaks theme
-
[Originally posted under FIXING WORDPRESS]
The p2 breathe theme with o2 plugin stops functioning properly in this scenario:
An authorized user ‘y’ (level=editor) adds a new user ‘x’ (level=contributor).
User ‘x’ signs on
User ‘x’ replies with comment to posts by ‘y’At this point, the theme works fine, everything is showing as expected.
Here’s where it breaks:
User ‘x’ is deleted using either:
– wp_delete_user($id, $reassign); …or…
– Dashboard==>Users==>Delete (including the dialog to reassign)In either method, the user is successfully removed.
**BUT**, it’s the ‘orphaned’ comment record that is disrupting the theme, and at that point:
=>The POST button spins off ‘o2 app not found’ messages, and
=>The console shows ‘TypeError: jsonifiedModel.userLogin is null’ message spelled out above.If the orphaned comment record is deleted, the theme functions normally.
I have verified this is the case with a vanilla WordPress / p2-breathe / o2 instance. I can provide a link / signon to the vanilla P2 theme site.
The comments.user_id value retains the original user ‘x’ user_id after the user deletion.
If comments.user_id is changed to a live user_id, the problem goes away and the theme works normally.
- The topic ‘p2 breathe – orphan comment breaks theme’ is closed to new replies.