Okay
  Public Ticket #2302355
Dynamic columns crashes wpDataTables
Closed

Comments

  • Jim started the conversation

    The rows on the table are the details of each user with role:subscriber on the site. If a new user joins, an extra row should be added. If a user is deleted, that row should also be deleted.

    The columns on the table are the names of the posts on the site. If the site has 3 posts with category 'preloaded', I need three columns. Each column header is the post title. If the admin adds an extra post (to make 4), or deletes a post (to make 2) then the table should reflect that. It should then have 4 columns or 2 columns.

    I asked a contractor to see if it is possible. He designed this attached php file (I attached it as a txt file) to generate a JSON file and build the table from that JSON file. 

    The problem we found is that if I add a new subscriber to the site, his information shows up on the table. *A new row is added*. That's good.

    However, if I add a new post to the site (with category "preloaded" like the others), the new post DOES NOT appear in the table. In other words: a new column with that post title and user's details for that post do not appear in the table. *No new column is added*. That's a problem. The plugin then also crashes and gives error messages, which I've attached here too.

    Is there a way to do what I want? So that the table creates columns dynamically, just like it can create rows dynamically?

  •  2,572
    Aleksandar replied

    Hello Jim

    Thank you for your interest in our plugin.

    I checked with one of our developers, and unfortunately what you're trying to achieve is not possible with wpDataTables at the moment. The tables will break when you add new column, change the order of columns, delete some columns or even rename existing columns. All settings for a table are being saved in the database, and when the plugin runs into an inconsistency, it breaks the table.

    Our development team will be working on this in the future, but I cannot tell you when it will be resolved.

    Kind Regards, 

    Aleksandar Vuković
    [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