• Resolved acrostich

    (@acrostich)


    As we don’t use geolocation I followed the advice in https://theeventscalendar.com/support/forums/topic/get-rid-of-you-have-venues-for-which-we-dont-have-geolocation-warning/ to get rid of the warning.

    Two days ago, I noticed that our events page was displaying a WP critical error.

    Logging in WP admin, there was an update waiting for the Events Calendar plug-in. I clicked to update it. Then trying to access any website page showed a WP critical error.

    By renaming folders of the plug-ins and our themese I eventually managed to clear that error.

    I got today (the email address used for admin was not one I received) the automated email from WP about this issue with the following information:

    Error Details
    =============
    An error of type E_ERROR was caused in line 46 of the file /home/autange1/public_html/wp-content/themes/AutAngel/functions.php. Error message: Uncaught Error: Class ‘TribeEventsGeoLoc’ not found in /home/autange1/public_html/wp-content/themes/AutAngel/functions.php:46
    Stack trace:
    #0 /home/autange1/public_html/wp-settings.php(528): include()
    #1 /home/autange1/public_html/wp-config.php(95): require_once(‘/home/autange1/…’)
    #2 /home/autange1/public_html/wp-load.php(37): require_once(‘/home/autange1/…’)
    #3 /home/autange1/public_html/wp-admin/admin.php(34): require_once(‘/home/autange1/…’)
    #4 /home/autange1/public_html/wp-admin/update.php(16): require_once(‘/home/autange1/…’)
    #5 {main}
    thrown

    Line 46 of functions.php is:
    remove_action( 'admin_init', array( TribeEventsGeoLoc::instance(), 'maybe_offer_generate_geopoints') );

    So obviously this way of removing these warnings is not safe, how to do it safely?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @acrostich

    Thanks for reaching out.

    The forum post you’re referring to is from 2014 and a lot of things have changed at the backend for our plugin since then, so you’re probably right about the advice in that page nor being safe.

    If you still get the warning messages, can you please remove the snippet from your functions.php file and then try reinstalling/updating the plugin to see if it resolves it?

    Best regards,

    Marho

    Thread Starter acrostich

    (@acrostich)

    The 2014 post is an old one, but it does seem sensible and it worked until it crashed WP during the update.

    I have removed this snippet and as mentioned WP is working fine.

    However, the warning about missing geolocations for venues is of course back.

    So is there a safe way to disable these warnings when not using geolocation of events?

    Hi @acrostich,

    Please replace the code snippet to this:

    remove_action( ‘admin_init’, array( Tribe__Events__Pro__Geo_Loc::instance(), ‘maybe_offer_generate_geopoints’) );

    It should work this time, let me know how it goes.


    Best regards,

    Marho

    Thread Starter acrostich

    (@acrostich)

    @matumu thank you for this suggestion.

    I just tried it, however it had no effect so I removed it to be on the safe side.

    Rgds.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Removing geolocation broke plug-in update’ is closed to new replies.