Okay
  Public Ticket #2517754
Conditional Logic
Closed

Comments

  • Scott a Donnell started the conversation

    The Conditional Formatting option in the datatable breaks the chart every time. If i click Save Changes on the attached screenshot, it puts up the loading screen and never resolves, and the table can no longer be accessed. It will error and not load. I'm trying to add a CSS class to a cell to hide a null value, since that is not a feature (This needs to be added ASAP).

  •   Scott a Donnell replied privately
  • Scott a Donnell replied

    This is the error i get in the console. It happens if I put any value into the field where "#N/A" is shown in the screenshot :

    wpdatatables.js?ver=3.0.3:789 Uncaught TypeError: Cannot read property 'conditionalFormattingRules' of undefined

        at a.fn.init.fn (wpdatatables.js?ver=3.0.3:789)

        at jquery.dataTables.min.js?ver=3.0.3:76

        at Function.map (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer&ver=5.4.2:2)

        at r (jquery.dataTables.min.js?ver=3.0.3:76)

        at P (jquery.dataTables.min.js?ver=3.0.3:31)

        at T (jquery.dataTables.min.js?ver=3.0.3:31)

        at s.<anonymous> (jquery.dataTables.min.js?ver=3.0.3:106)

        at s.iterator (jquery.dataTables.min.js?ver=3.0.3:100)

        at s.<anonymous> (jquery.dataTables.min.js?ver=3.0.3:106)

        at s.draw (jquery.dataTables.min.js?ver=3.0.3:103)


  •  2,521
    Aleksandar replied

    Hello Scott

    I'm not sure what's the issue here, but I can't replicate it locally.

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. 

    It'd also be great if you can provide me phpMyAdmin access credentials, so I can revert changes that break the table during testing, and FTP access to see if there's anything in our code I can change to make it work (if there is an issue with our plugin on the website).

    Also, please make sure to tell me what's the table ID, so I know where to look.

    You can write credentials here just check Private Reply so nobody can see them except us.

    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

  •   Scott a Donnell replied privately
  •   Aleksandar replied privately
  •   Scott a Donnell replied privately
  •  2,521
    Aleksandar replied

    Hi again Scott

    The issue here is that the source type of that column is actually "String" otherwise you wouldn't see this when the table is initially created:

    8950668045.png

    But "0.00" where #N/A is. Even though you're changing the column type in the plugin, it's still coming through as "string", so when you apply conditional formatting "IF cell value = 0", it fails to apply the rule as a numerical format to a string column, and that's why it breaks.

    You would need to modify the source file, and change all "#N/A" to "0.00". After that you will have no issues applying the conditional rule.

    I removed the rule from the database wp_wpdatatables_columns table using WP phpMyAdmin plugin, and you can delete it if you don't need it.

    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

  • Scott a Donnell replied

    Thanks Aleksandar. We're going to bypass this plugin for the charts that use null values. N/A and 0 are not the same thing, we need those values to be null. Highcharts supports this, so we're using that directly. It's not a great solution, I recommend getting null values into your product development queue, I've seen other support threads with the same issue, I imagine it's common. Using hooks as I've seen suggested in those other threads doesn't support our specific use case. You can close this ticket. 

  •  2,521
    Aleksandar replied

    Thanks for your feedback Scott.

    I will forward it to our development team.

    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