Filter option "near City" not working…

Home Forums Calendar Products Filter Bar Filter option "near City" not working…

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1107010
    Henning
    Participant

    Dear TEC(P)-Team,

    we are having issues with the GeoLoc-filter that is in place with /calendar.

    TEC & TECP are up to date. I have deactivated all the other plugins, no changes.

    Reverting to the twenty sixteen theme DID SOLVE THE ISSUE, now the filter is working properly but I cannot figure out what is wrong with our current (child-)theme since I compared and updated the template files accordingly (Diff-checker run for the original plugin-files and our theme files)…

    I’ve noticed that the URL isn’t being generated properly in our current theme, instead of

    http://URL.tld/calendar?tribe_paged=1&tribe_event_display=list&tribe-bar-geoloc-lat=52.52000659999999&tribe-bar-geoloc-lng=13.404953999999975&tribe-bar-geoloc=Berlin%2C+Deutschland

    (which I took from the twenty sixteen test environment) it just outputs

    http://URL.tld/calendar?tribe_paged=1&tribe_event_display=list&tribe-bar-geoloc=Berlin%2C+Deutschland

    If I manually enter the URL with tribe-bar-geoloc-lat & tribe-bar-geoloc-lng then it works fine in our current environment as well.

    TEC Debug is activated for you to further inspect.

    Please advise!
    Thanks & regards,

    Henning

    #1107491
    Hunter
    Moderator

    Hi Henning,

    Welcome to the forums. Based on the issue being resolved once reverting back to the default theme, there is unfortunately not much I can do in regards to theme conflicts. Your best bet is to contact your author to see if they have any insight on how to go about resolving the conflict.

    I really do wish I could be of more assistance but these types of requests extend beyond the scope we’re able to provide. Thanks for understanding and good luck finding a solution.

    #1108188
    Henning
    Participant

    Allright, I’ve found the cause of the issue myself – it lies within my renaming of the filter bar via the following code… If I deactivate the function(s) then the geoloc-stuff loads fine and fires accordingly.

    Could you be of assistance here at least? What else do I need to include into my function in order to get things to work / filter properly?

    Thanks!

    /**
     * Modify The Events Calendar search labels / placeholders
     */
    
    function placeholder_rename_search( $filters ) {
     
        $value = '';
         
        if ( ! empty( $_REQUEST['tribe-bar-search'] ) ) {
            $value = esc_attr( $_REQUEST['tribe-bar-search'] );
        }
     
        $html = sprintf(
            '<input type="text" name="tribe-bar-search" id="tribe-bar-search" value="%s" placeholder="%s">',
            esc_attr( $value ),
            'Topic or Class'
        );
     
        $filters['tribe-bar-search']['caption'] = 'Search';
        $filters['tribe-bar-search']['html']    = $html;
     
        return $filters;
    }
    
    function placeholder_rename_location( $filters ) {
     
        $value = '';
         
        if ( ! empty( $_REQUEST['tribe-bar-geoloc'] ) ) {
            $value = esc_attr( $_REQUEST['tribe-bar-geoloc'] );
        }
     
        $html = sprintf(
            '<input type="text" name="tribe-bar-geoloc" id="tribe-bar-geoloc" value="%s" placeholder="%s">',
            esc_attr( $value ),
            'City'
        );
     
        $filters['tribe-bar-geoloc']['caption'] = 'Near';
        $filters['tribe-bar-geoloc']['html']    = $html;
     
        return $filters;
    }
    
    add_filter( 'tribe-events-bar-filters', 'placeholder_rename_search' );
    add_filter( 'tribe-events-bar-filters', 'placeholder_rename_location' );
    #1109022
    Hunter
    Moderator

    I’m glad to hear that you’ve identified the culprit! I took a quick look through those functions and didn’t spot anything obviously problematic—no syntax errors, for example.

    So this means that you have some other not-so-obvious problems in your customization.

    As noted on this page, we are not able to help with customizations → https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/. I took a quick look at things regardless to no avail, so you’ll have to take the reins from here.

    If you are not able to troubleshoot your code yourself, I would recommend hiring a professional to help. We have a list of great developers here → http://m.tri.be/18k1 (and have no affiliation with any of these folks–they’re simple some well-respected names in the community that we’ve compiled to share in situations like this one).

    Best of luck with your customizations!

    #1109071
    Henning
    Participant

    OK, thanks for the clarification!

    #1109586
    Hunter
    Moderator

    Sure thing 🙂

    I’ll close this out but feel free to open a new thread should anything else come up. Have a good week!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Filter option "near City" not working…’ is closed to new replies.