Okay
  Public Ticket #2749296
database connection
Closed

Comments

  • Heather Wicksted started the conversation

    Hello. I have what might be a two-part question. 

    I am trying to update custom CSS code in the settings portion of WPDatatables. (Specifically - add more tables to apply this CSS too: #table_3 > thead > tr:nth-child(2) > th {background-color: #A8DADC !important;}). 

    When I add the code and then hit save, I get an error that says: 

    "wpDataTables could not connect to mysql server. mysql said: There was a problem with your SQL connection - Access denied for user 'usernamedeletedforsecurity' (using password: YES)"

    BUT.. when I click on check database connection it says "Success it Works." As well..all other functionality works - all of my tables are able to edit, update, delete etc.. from the database connection... 

    So - I am either adding custom CSS incorrectly, or there is a problem with my connection. 

    My perfect resolution: 

    1. Be able to add the CSS code to the settings to apply to tables, 1,3,5,7,9,11,13 on one specific page. 

    [I did try adding in the CSS to each table but that failed - most likely because I don't have strong CSS skills, I also tried adding the CSS code to the specific page and also failed] 

    2. Ensure that my database connection in fact is still working 

    I will add TMS as a user and send the login credentials as a private ticket. 

  •   Heather Wicksted replied privately
  • [deleted] replied

    Hi Heather 

    Thank you for reaching out to us.

    Since you are setting the column width in column settings, these are not needed:

    table.wpDataTable td.stamp_image {
    width: 150px !important;
    }

    table.wpDataTable td.issue_image {
    width: 150px !important;
    }

    As for the remainder of the CSS - to which table and column(s) does each of them apply to? 

    The separate DB connection is in no way connected to the custom CSS. The only thing that comes to mind is that your browser is adding your saved username or password to one of the fields in Separate DB Connection tab - we can't see this, but it could be on your end.


  • Heather Wicksted replied

    Thank you for following up with me. 

    I am not sure that your answer addresses my concern. 

    Are you able to adjust the Custom CSS in the overall settings? I have cleared the cache on my browser, and on the page where the tables are. I am still getting the error. 

    As for removing the column width settings, I am unable to do that because I can't update the custom CSS on global settings for Wpdatabables. So, I couldn't remove the table width settings if I wanted to. Not to mention add the colour settings for the filter row. 

    First:  can you update the global settings? 

    As for the tables - I want all of them to have the light blue row in the filter row for all columns. 

    What would the CSS be for me to add on each table in custom settings? I have tried a few different things, but clearly don't have the right css. You can see what I have tried on the table: animalsonstamps.com | My List. 

    BUT the ONLY time the issue presents itself is when there is more than 2 tables on a page. Which brings me back to my original solution of adding #table_5 > thead > tr:nth-child(2) > th {background-color: #A8DADC !important;} to the global CSS settings. 

    SECOND: I want all tables to have a filter row that is light blue - regardless of how many tables are on each page. 

    Thanks for your help. 

  • [deleted] replied

    Hi Heather

    Included support for the plugin does cover a few minor CSS tweaks. However, you already have a lot of CSS added, and I don't feel comfortable changing this in your stead. Every table added to the front has an odd identifier, so if you have 3 tables, they'd be #table_1; #table_3 and #table_5. My advice would be to use:

    .wpDataTablesWrapper table.wpDataTable th {background-color: #A8DADC !important;} 

    to the global settings, if you wish to change the color of headers for ALL tables. 

    If you need to apply it only to some tables, unfortunately you will need to use table identifiers, but know that you will need to change the identifier for every page, because they change depending on the order of tables on the page. 

    The filter row is light blue for all tables on "my-list" page. Again, instead of #table_3 and #table_1, you could use the ".wpDataTablesWrapper table.wpDataTable" selector, and it should be applied to all tables.


  • Heather Wicksted replied

    This brings us back to the bigger issue I am having. I cannot change any css globally for wpdatatables. I get a "cannot connect to the database error" (See the original post I made for the specific wording). 

    So... I would love to add the css you have suggested below (thanks for that)- and I could also delete some other CSS that I don't think I need anymore...but I can't make any changes there. 

    Do you get the same error when you try to make a change?  I have cleared my cache, I have cleared the server cache, I have logged out, logged in etc.. checked the database connections on my hosts end... 

    All other functionality works -with respect to connecting to the database - this is the only thing I am unable to do. 

    If you can make a change, then it means it is my computer/connection. If you can't make a change then it means it is a bigger issue, and I would need some support on how to fix that. 

    .wpDataTablesWrapper table.wpDataTable th {background-color: #A8DADC !important;} 
  • [deleted] replied

    By the error message that you're getting, it seems like the user is either blocked or that the credentials for that user are wrong.

    Can you re-enter the connection details for this separate connection, and try again? I can also test it from my end, if you can provide me with the details.

  • Heather Wicksted replied

    I had already done this prior to submitting a ticket. Changed the password, created a new users, etc.. 

    Each time, the Database Connection works (meaning editable tables make edits in the database, and the tables show updates made in the database) and the test the connection button works ...

    But I can't change the global CSS settings? 

  • [deleted] replied

    Hi Heather

    We can't connect to your separate DB using your credentials. The error message that comes up reports a different username, and it's coming from the MySQL separate connection, not the "Stamp Data" separate connection. The "MySQL" separate connection is trying to connect to "localhost" host, and I suppose it is causing the issue. As long as this connection is there, and it's malfunctioning nothing from wpDataTables can be saved. It's not the "Stamp Data" connection, that's causing the issue, but the "MySQL" connection - you need to inspect that.
    None of the tables that you have are coming from "MySQL" separate connection, so if you don't need that connection - delete it, and everything will work fine.


  • Heather Wicksted replied

    AMAZING! It is working perfectly now. Thank you again for your help. 

    Cheers,

    Heather

  • [deleted] replied

    You are most welcomesmile.png

    I'm glad to hear it works! If there is anything else we can assist you with please don't hesitate to open a new ticket.

    Have a wonderful day

  •   Heather Wicksted replied privately
  • [deleted] replied

    Thank you so much we are really happy to hear thatsmile.png

    Please don't hesitate to reach out to us if there is anything else we can help with.

    Have a wonderful day!