I'm having an issue with inline editing. When I make a change to a row, I get the notification that the data has been successfully saved, but the row doesn't change and instead a new row is created at the end of the table. Please advise
If not, the issue could be related to the auto-increment ID column, used for editing and adding new data. In manual tables, that's the hidden wdt_ID column, so if you imported a table, or created one with an SQL query, that table needs to have that unique auto-increment column, which would be defined as the ID column for editing in the Editing tab above the table.
I have the same issue in the modal as well. I have the auto-increment ID column set to product_id, which is auto-incrementing in our database. You're saying I should change that to wdt_ID?
Not really, the wdt_ID is the column which is automatically generated for manual tables. It's not the name of the column that can cause issues.
Can you please provide me a temporary wp-admin (administrator) and database access credentials, so I can take a look? Just make sure to tell me what's the table's ID, so I know where to look.
Also, this is a public ticket, so make sure to enable the PRIVATE response when you're leaving credentials.
I see that you can add and edit a new row, the issue I'm still having is that I can't edit the already existing rows ie. the rows that are being generated from the SQL query. For example, if I edit row 1, the data is saved but the row reverts to its original data and it then creates a new row at the bottom with the updated data. Does that make sense? Is there a way to resolve this?
That actually shouldn't make sense, because you're pulling the data from the database - adding new rows and editing them should behave the same as it behaves for previously entered data.
I tested the table again, and modified product_id:3:
Original:
Edited:
And the new row hasn't been added to the end of the table.
The issue only seems to appear for the first row, because the product_id (set to be the editing column for the table) starts with a 0. That's not a valid value in SQL, and that's why when you edit that row, it ignores the change, and adds a new row to the table. Basically, it doesn't have anything to edit, as in SQL 0 doesn't exist as a valid row ID.
If you are able to modify the column in the database, and have it start from 1, instead of 0, you would not see the issue anymore.
I'm having an issue with inline editing. When I make a change to a row, I get the notification that the data has been successfully saved, but the row doesn't change and instead a new row is created at the end of the table. Please advise
Hello Tommy
Thank you for your purchase.
Does editing work in a modal (not in-line)?
If not, the issue could be related to the auto-increment ID column, used for editing and adding new data. In manual tables, that's the hidden wdt_ID column, so if you imported a table, or created one with an SQL query, that table needs to have that unique auto-increment column, which would be defined as the ID column for editing in the Editing tab above the table.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Alex,
I have the same issue in the modal as well. I have the auto-increment ID column set to product_id, which is auto-incrementing in our database. You're saying I should change that to wdt_ID?
???
Hi again Tommy
Not really, the wdt_ID is the column which is automatically generated for manual tables. It's not the name of the column that can cause issues.
Can you please provide me a temporary wp-admin (administrator) and database access credentials, so I can take a look? Just make sure to tell me what's the table's ID, so I know where to look.
Also, this is a public ticket, so make sure to enable the PRIVATE response when you're leaving credentials.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Alex,
Thanks again for your help,
I see that you can add and edit a new row, the issue I'm still having is that I can't edit the already existing rows ie. the rows that are being generated from the SQL query. For example, if I edit row 1, the data is saved but the row reverts to its original data and it then creates a new row at the bottom with the updated data. Does that make sense? Is there a way to resolve this?
Hi again Tommy
That actually shouldn't make sense, because you're pulling the data from the database - adding new rows and editing them should behave the same as it behaves for previously entered data.
I tested the table again, and modified product_id:3:
Original:
Edited:
And the new row hasn't been added to the end of the table.
The issue only seems to appear for the first row, because the product_id (set to be the editing column for the table) starts with a 0. That's not a valid value in SQL, and that's why when you edit that row, it ignores the change, and adds a new row to the table. Basically, it doesn't have anything to edit, as in SQL 0 doesn't exist as a valid row ID.
If you are able to modify the column in the database, and have it start from 1, instead of 0, you would not see the issue anymore.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Alex,
That makes sense, I'll try that out. Thanks again
You're welcome, Tommy!
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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