Pod field not reflecting all db entries
-
We have a bidirectional relationship setup between users and a custom post. Posts has a pod with a list of subscribed users. Users has a pod with a list of post subscriptions. Updating one, should update the other.
If I query the postmeta table I see over 1300 users subscribed to this one post id. Some of these users, although in the db, are not reflected when I open the edit on that post and view the subscribed users field? They are in the db, but not shown in the field. Therefore, if administrator hits update on that post, since they are not shown in the field, they get removed. If I don’t hit update, and goto the user, I do see the post listed in the post subscriptions for that user.
So problem 1 is the db has both the usermeta data and the postmeta data, but the dashboard isn’t reflecting all the postmeta values.
Trying to get a grasp on it, I queried the usermeta. Here I see over 1400 users subscribed to that same post. I would have thought this count should have been the same count as the postmeta query, but it’s 77 more subscribers. That said, none of those 77 users appear to have the product listed for subcription when viewing the user edit. (which maybe makes sense since if they are removed because the corresponding postmeta data isn’t there.).
Could this difference in quantity also be a reason for problem 1 above? I am not sure why it would, but maybe I got some broken data (much of this data was imported via csv and it did time out a few times, requiring a new import minus already imported data). Do I need to address those 77 extra subscribers in the usermeta data in order for the postmeta to reflect correctly in the editable field? (By address I mean determine if they are subscribers or not and either add corresponding entries to the postmeta or delete existing entries from the usermeta.)
- The topic ‘Pod field not reflecting all db entries’ is closed to new replies.