Okay
  Public Ticket #1663108
Editing Issues - Aliases and Modal Background
Closed

Comments

  • James started the conversation

    HI, I have a LEFT JOIN  table query. I have to have aliases for Group By to successfully execute. wpDt is working well, I just can't edit.

    On row edit, Update, I get  "field ID not found for FIRST_NAME", I can change some aliases but not all or the Query will fail.(my query is below )

    Is there a solution? 

    Next Edit related issue, currently I'm editing as an Admin(?)...but when I edit and get previously mentioned error, the modal disappears but modal background does not, making the page inaccessible without refreshing. 

    Any ideas about this?

    the Table Query: 

    SELECT
    j.post_type,
    j.ID AS POST_ID,
    j.post_status,
    j.post_name,
    j.post_title,
    MAX( IF( u.meta_key =  'first_name', u.meta_value, NULL ) ) AS FIRST_NAME, 
    MAX( IF( u.meta_key =  'last_name', u.meta_value, NULL ) ) AS LAST_NAME,
    MAX( IF( u.meta_key =  'nickname', u.meta_value, NULL ) ) AS DISPLAY_NAME,
    MAX( IF( u.meta_key =  'cs_phone_number', u.meta_value, NULL ) ) AS  CUST_PHONE,
    x.user_email
    FROM `wp_usermeta` u  
    LEFT JOIN `wp_posts` j  ON j.post_author = u.user_id
    LEFT JOIN `wp_users` x  ON x.ID = j.post_author 
    WHERE ( u.meta_key = 'first_name' OR u.meta_key = 'last_name' OR u.meta_key = 'nickname' OR u.meta_key = 'cs_phone_number')
    AND j.post_type = 'jobs'
    AND j.post_status != 'trash'
    AND j.post_status != 'draft' 
    GROUP BY  POST_ID




  •  472
    Isidora replied

    Hi James,
    Thank you for your purchase.

    When you are using queries with Joins please note that only one table can be editable at the moment in wpdatatables. So when you make table from that query you will not be able to edit because you are using more tables in query.

    Can you please provide me a link of page where you are using this table so I can see it and check edit modal? I suppose that there is css conflict with theme that you are using.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables