Okay
  Public Ticket #2755211
Filtered Date is not showing correctly
Closed

Comments

  • Bruce started the conversation

    Hi,

    I created a filter on a date field (Event Date) using filter type Selectbox.  However, when accessing the webpage and clicking the filtered list, the list of values are not correct.  They do not correspond to the valid Event Dates of the remaining records.

    Too, those dates are not in my database table. Not how they were generated and why they are not valid dates.

    See the video below.

    https://www.loom.com/share/772ce7a72bcf4ea7a90a9dbbc2dd24fd

  • [deleted] replied

    Hi Bruce

    Thank you for reaching out to us.

    Could you please tell us how did you create the table and send us the source file so we can try and recreate the issue on our end? Are you experiencing the same issue in the backend as well or only frontend? 


  • Bruce replied

    Hi Blazenka,

    Thanks for responding. Yes, I'm experiencing the issue on the backend as well.

    Here is the table's DDL

    CREATE TABLE all_events
    ( EventID int(10) NOT NULL DEFAULT '0'
    , LakeID int(10) DEFAULT NULL
    , Lake varchar(50) CHARACTER SET utf8 DEFAULT NULL
    , event_date date DEFAULT NULL
    , region_id int(10) DEFAULT NULL
    , Year int(10) DEFAULT NULL
    , region varchar(50) CHARACTER SET utf8 DEFAULT NULL
    , regionyear_id varchar(15) CHARACTER SET utf8 DEFAULT NULL
    , UNIQUE KEY all_events_pk (EventID)
    , KEY all_events_idx1 (regionyear_id)
    , KEY all_events_idx2 (Year)
    , KEY all_events_idx3 (Lake)
    , KEY all_events_idx4 (event_date)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


    To build the data in the webpage,  I used the option "Generate a query to the MySQL database."  I selected the database table and columns I wanted and the plugin generated a query.

    SELECT all_events.Year,

           all_events.region,
           all_events.Lake,
           all_events.event_date
    FROM all_events


    See the data to recreate the issue attached.



  • Bruce replied

    Hi,

    Please let me know if you need additional information.  My client is waiting to go live but this is impeding the go-live date.

    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce

    Thank you for the information. Unfortunately we were not able to replicate the issue locally. When we import your database table, and use your query it works fine, so that implies that the issue could be coming from your database. Even when we use the same date format, the filter works fine. 

    3299530384.png

    Can you clone your website?

    If yes - I'll ask you to install the Duplicator plugin. It will generate a couple of files which you can send me (along with the log-in credentials), and then I can create an exact copy of your website, see what the issue is and try to resolve it.

    Please note that the files will be too large to attach to the ticket, so you can upload them via wetransfer.com and just send me the link.

  •   Bruce replied privately
  • Bruce replied

    Hi Blazenka,

    FYI, I was trying to use cascading filters.  Turn cascading on and try again if you had not.

    Did you try picking a Year (2021), a Region (So Cal) , then try picking an Event Date?  This is where I saw the issue.  The Event Dates in the dropdown was 1970.  Not actual valid dates.


    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce

    Thank you for the additional information we were able to recreate the issue.

    I will forward this to our developers to take a closer look and I will get back to you as soon as I get a reply.

    Thank you for your time and patience.

  • Bruce replied

    Thank you.

    If they can provide a solution as quickly as possible that would be great.

    In general, the filters are not working correctly.  You can take a look at https://abatournaments.wpengine.com/scheduled-events/ .  Look at the tab EVENTS SCHEDULE RESULTS .  The filters are not working.

    Also, how do I make the Year filter list the values appear in descending order?


    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce

    The issue is caused by the query in the table 7. Please remove the CONCAT function or create MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.

    I hope this helps, please don't hesitate to contact us if there is anything else we can assist you with.

  • Bruce replied

    Ok, thanks!!  I'll try that.

    What about sorting a filter sectionbox in decending order?

    Thanks

    Bruce

  • Bruce replied

    Hi Blazenka,

    That solution still doe not work.

    I created a view and remove the concat as well as the photo column and I have the same issue.

    Please help.

    Cascading filter was the main server I purchased the addon.

    Thanks

    Bruce

  • [deleted] replied

    HI Bruce

    Based on your reply "In general, the filters are not working correctly.  You can take a look at https://abatournaments.wpengine.com/scheduled-events/ .  Look at the tab EVENTS SCHEDULE RESULTS.  The filters are not working." 

    We looked at table 7 and saw that the CONCAT function is causing the selectbox issue, when you take it out or create a view the selectboxes will work properly.

    As for the date filter, we will need to perform a debugging so we are waiting for the duplicator.

  • Bruce replied

    Hi Blazenka,

    Thanks. 

    My hosting provider will not approve that the duplicator plugin.  Are you ok with using a backup from another tool?

    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce

    Can you try this one https://wordpress.org/plugins/all-in-one-wp-migration/?

    Thank you

  • Bruce replied

    Hi Blazenka,


    Here is the link to the export file.

    Let me know if you need anything else.  My client is breathing down my neck on this one.


    https://www.dropbox.com/s/k4v3hzcentn58xf/abatournaments.wpengine.com-20210423-210147-uauijy.wpress?dl=0

    Thanks

    Bruce

  • Bruce replied

    Hi Blazenka,

    Please let me know if this is sufficient for you to help resolve the issue?

    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce

    I apologize for the late response, we don't work on weekends.

    I forwarded this to our developers to take a look and I will get back to you as soon as I hear back from them.

    Thank you for your time and patience.

  • Bruce replied

    Ok, thanks!

  • Bruce replied

    Hi Blazenka,

    Can this issue be upgraded to high priority?

    My client is dependent on this fix to go-live with their new website.

    If I'm unable to get it resolve soon, I'll have to request a refund and select a different solution.

    One of the reasons I selected your product was because of this feature.

    Please let me know the likelihood of getting a fix within the next day or so.


    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce

    Thank you for your patience. 

    I have marked this as highest priority so our developers can get to it asap. I will update you by the end of today.

    Once again we appreciate your time and patience.

  • [deleted] replied

    Hi Bruce

    Our developers were able to fix the issue you were experiencing. There seems to be a bug in some cases for date column and powerful filters. They will be testing this further and a permanent fix will be included in the next update.

    We want to thank you for your patience, and please do let us know if there is anything else we can assist you with.


  • Bruce replied

    Hi Blazenka,

    Thank you for your support.  That's great that a bug was discovered and fixed.

    I know you all will be on holiday so I can have a fix before your holiday.  My client is trying to go-live and we are held up by this bug.  Waiting until Wednesday of next week will not be an option.

    Is there a workaround I can implement until the next update?  I'm under extreme pressure to resolve this issue and go-live with my client's website.  He's losing money each day it's not fixed.

    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce

    I believe there was a misunderstanding, the fix is already on your website. If you test it you will see everything works nowsmile.png 

    When I said it will be included in the next update I meant the fix we added on your website will not disappear when you update the plugin so your don't have to worry about this happening again.

    Do let me know if there is anything else we can assist you with.

  • Bruce replied

    Awesome!!!!

    Thanks so much!

  • Bruce replied

    Yes, it's working.  Thanks again.

    How do I get the my filters to sort the list of values in a descending order.  For example, I want to see the List of Years in descending.  


    Thanks

    Bruce 

  • [deleted] replied

    Hi Bruce

    You can add the possible values manually in descending order, in the column settings, if you want the string type column values to appear in a specific order. 

    6051945696.png

    I hope this helps, do let us know if you need any further assistance.

  • Bruce replied

    Hi Blazenka,

    Thanks for your response.  Hope you had a great Holiday!

    I was referring to when I use as filter with filter type selectbox.  

    I don't seem to have any control of the order the list of values are returned. 

    Specifically, I have a Year column and I'm trying to see the list of values in descending order.

    Thanks

    Bruce

  • [deleted] replied

    Hi Bruce 

    Thank you, I hope you are having a great day as wellsmile.png 

    Could you please tell me what column type is this Year column? Unfortunately I am not able to access the link you provided

    4651852912.png


     If you set the column type to String you will be able to manually add values that will appear as the filtering options, and they will appear in the order you add them.

    3700760459.png
    8002075998.png
    4732108495.png


  • Bruce replied

    Hi Blazenka,

    Thanks!  It's an integer column type.  See attachment.

    Also, please note that I have another column that I'm using to sort by on the load so the year column can not be used in it's place if you are thinking of suggesting that.  Too, I'm not sure if that even affects the ordering of the List of Values.  

    Thanks

    Bruce

  • Bruce replied

    Any update?

  • [deleted] replied

    Hi Bruce

    You can only achieve this if you set the column type to String and manually add the values as I stated before.

    You can only choose ascending or descending if you go to "sorting" tab of column settings, and set this column to be a default sorting column for the table; but I don't believe even with this that you'll be able to achieve this in the filter.

  • Bruce replied

    Ok, thanks for the reply.


    Bruce

  • [deleted] replied

    You are most welcome, do let us know if there is anything else we can assist you with.

    Have a wonderful day!