Hey there, Awesome Customers!

Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.

During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.

We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.

Thanks a bunch for your understanding and support!

Catch you on the flip side!

Warm regards,

TMS

Okay
  Public Ticket #3594600
Front-End Editing not possible after introducing new PrimaryKey Format
Closed

Comments

  •  1
    Daniel started the conversation

    Hello,

    we have a MySQL table that gets used with Front End Editing.

    Until now the Primary-Key in this table was a 16 digit long number. Since we're switching the program that feeds data into the table, this will change to a longer alphanumerical identifier.

    This is permitted by the MySQL table settings (nvarchar(45)) and the data type in wpdatatables is set to "string", for this column.

    The problem is, as soon as we have a single row with the new Primary Key format in the table, it is not possible to edit any entry in the table through wpdatatables. It gives out an error for a duplicate Primary Key value when you try.

    If you delete all the letters from the new Primary Key it will give out a success, but no change will be applied.

    If you then shorten the new Primary Key to the length of the old format, it is possible to edit again.

    If you empty the table and only have entries with the new Primary Key format it is possible to edit again, but that would cause a lot of extra work.

    Is there some form of Data-Type interpreting going on? 

    This is happening on Version 6.2 of wpdatatables.


    Update: The cause of the issue might be a bit different. I have tried updating all the existing Primary Keys in length and adding some letters. 

    Then it told me that the Primary Key column required a default value (when editing).

    When I set the default value it created a new row with the default value and the edit that I did. 

    I feel like it was trying to create a new row all along but I do not understand why it would do that all of a sudden, when all that was changed was the length of the data.

  •  1
    Daniel replied

    Nevermind, I figured it out. 

    I wasn't aware that the editing requires an Integer ID column and that it says so in the tooltip.

    Created a separate column for it, and now it works.

  •  1,692
    Miloš replied

    Hello,

    I am delighted to hear that this has been resolved. Thank you for letting us know. Anything else that we could assist with, please don't hesitate to create new tickets.

    Have a great day! :)


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

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

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables