Custom Fields
Re-Envisioned
Support MB Relationships MB Relationships falsely assuming table prefix

  • Creator
    Topic
  • #20599
    Resolved badabingbreda
    Participant

    I get this error when adding a reciprocal relationship:

    WordPress database error: [Unknown column 'wp_posts.ID' in 'field list']
    SELECT wpec_posts.* , mbr.from AS mbr_from, mbr.to AS mbr_to, mbr.ID AS mbr_id, CASE WHEN mbr.to = wp_posts.ID THEN mbr.order_from WHEN mbr.from = wp_posts.ID THEN mbr.order_to END AS <code>mbr_order</code> FROM wpec_posts INNER JOIN wpec_mb_relationships AS mbr ON (mbr.type = 'attendance_to_student_present' AND ((mbr.from = wpec_posts.ID AND mbr.to IN (794)) OR (mbr.to = wpec_posts.ID AND mbr.from IN (794)))) WHERE 1=1 AND wpec_posts.post_type IN ('post', 'page', 'attachment', 'attendance', 'location', 'property', 'agent') AND (wpec_posts.post_status = 'publish' OR wpec_posts.post_author = 1 AND wpec_posts.post_status = 'private') GROUP BY mbr_from, mbr_to, wpec_posts.ID ORDER BY <code>mbr_order</code> ASC, mbr_id DESC
    

    As you can see the table prefix is ‘wpec_’ and not ‘wp_’, but it seems as though the wp_posts has been hardcoded into the plugin (line 78 in query.php)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #20611
    Long Nguyen
    Moderator

    Hi,

    I’m going to check it out and let you know later.

    Thank you.

    #20656
    Long Nguyen
    Moderator

    Hi Didou,

    Please update the new version of MB Relationships v1.10.2 to fix this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.