States Listed in Multiple Formats Based on Import But Not on Database

Home Forums Calendar Products Filter Bar States Listed in Multiple Formats Based on Import But Not on Database

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1199851
    Damion
    Participant

    Good afternoon,

    We have a similar issue to this thread: https://theeventscalendar.com/support/forums/topic/fix-states-listed-in-the-filter/ except we have several thousand events.

    What brought this issue to our attention is, we have the State/Province filter live, and in dropdown form. When you go to select something, you see “FL” as well as “Florida.” That’s fine on its own, because from a user experience standpoint you don’t know what expectation people will have about how to format.

    The issue is, they come up with different events.

    Meaning, there’s a whole set where, if you visit their main single event page, you see their address (per their venue, by the map) with “FL” written out, and a second set of different races where it’s written out as “Florida” in the same spot.

    The weird thing is, I went looking through the database, especially after reading that other individual’s thread, to see where the offending abbreviation-using events are. No dice. It doesn’t come up against any race. All the VenueState meta keys have meta values written out as full names.

    So I went peeking at the venues themselves, via their respective edit screens, to see what the functional difference was; in other words, how were they entered?

    Turns out, regardless of the source data used in import (where I strongly believe abbreviations were used here and there), after the import every edit screen (even for venues where their events depict abbreviations on the front end) has the same fully written out version.

    Is there a way to even this out, or tell the system they both mean the same thing? The normal non-Filter Bar location search distinguishes between them fine; it looks for both. So there’s a precedent for the functionality to work. But it’s important to my site owner that the regular location search stay in its lane as far as being limited to a certain distance. In other words, he’d rather have that search stick to looking up everything correctly, but up to, say, 50 miles. Then the State/Province filter bar search can go all-state.

    I am comfortable coding if there are broad suggestions about extending classes in ways that might work, unless this is somehow a bug. Open to any suggestions either way.

    Thanks for making such a quality plug-in; despite our unique use case and the hiccups of transition, it is doing a LOT of heavy lifting without complaining, and being nicely interconnected.

    #1200617
    Hunter
    Moderator

    Hi Damion,

    Thank you for being so thorough in your post. We also appreciate the kind words! We have some reports aimed to improve both the Tribe Events Bar and the Filter Bar, but I went ahead and created a specific report for this topic as I’ve noticed the issue myself. You can try the following SQL query to update the _VenueState info.

    UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'FL','Florida') WHERE meta_key LIKE '%_VenueState%';

    I don’t have an answer on whether if/when a fix will be available for this issue, but please stay tuned to our Release Notes and the plugin changelogs for more information. Thanks again and let me know if you’ve got any additional questions or comments. Cheers!

    #1200984
    Damion
    Participant

    The query is, of course, well-formed, but didn’t bring back any results. Not even by surprise. As I mentioned, everything looks fine post-import, as far as the back end—even at the database level. It’s that bizarre front end presentation that’s throwing things off.

    I literally can’t tell where it’s getting the abbreviation from, and definitely can’t tell how it’s picking sides.

    The closest I can find is _field_20 and _field_60 in wp_postmeta; is it possible the plug-in generates its own kind of custom fields for what amounts to temporary storage or “translations” (not like between languages, but in lieu of an index to bounce between situations like this, from a postal code to a name)?

    To be clear, I don’t have any evidence those are being generated by the plug-in, it’s just that, there’s nothing else installed that really has a need to mention state codes and there doesn’t appear to be anything else installed using the underscore up front as a convention for naming keys.

    #1202461
    Hunter
    Moderator

    Hello,

    Thank you for your patience while I did more investigating on the matter. I found the array of the state codes and names can be found in /the-events-calendar/common/src/Tribe/View_Helpers.php. I believe this is where the two different ways of representing states comes from.

    I logged another bug to address the issue of getting different results when selecting “FL” and “Florida” from the Filter Bar State/Province option. Please stay tuned to the plugin changelogs and our Release Notes for more information.

    Please let me know if you have any additional questions on the matter and have a great rest of your day. Cheers!

    #1211107
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘States Listed in Multiple Formats Based on Import But Not on Database’ is closed to new replies.