• Hello,

    tonight, the auto-update triggered to version 1.6.0 and that broke my wp-admin. It also sent a mail with details which is here:

    Uncaught Error: Call to undefined method ACFFieldOpenstreetmap\Core\Core::upgrade() in {path}/wp-content/plugins/acf-openstreetmap-field/include/ACFFieldOpenstreetmap/Core/Plugin.php:131
    Stack trace:
    #0 {path}/wp-includes/class-wp-hook.php(324): ACFFieldOpenstreetmap\Core\Plugin->maybe_upgrade()
    #1 {path}/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #2 {path}/wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 {path}/wp-admin/admin.php(175): do_action()
    #4 {main}

    On my installation, I “fixed” it by opening this file /wp-content/plugins/acf-openstreetmap-field/include/ACFFieldOpenstreetmap/Core/Plugin.php, find line 123

    public function maybe_upgrade() {

    and add after that:

    return;

    So that maybe_upgrade doesn’t do anything. This unbroke wp-admin at least.

    I also grepped the plugin folder for function upgrade( to see if there was a “better” fix, but apparently not, this method doesn’t seem to exist.

    I’d appreciate if you can have a look into this.

    Thank you and have happy holidays. :–)

Viewing 1 replies (of 1 total)
  • Hi,

    I had same issue after upgrade 1.5.7 to version 1.6.0.
    I fixed this by adding the missing function “upgrade” to /wp-content/plugins/acf-openstreetmap-field/include/ACFFieldOpenstreetmap/Core/Plugin.php

    // Fix, because there is not function upgrade in version 1.6.0, 
    // function is borrowed from version 1.5.7.

    /**
    * Fired on plugin updgrade
    *
    * @param string $nev_version
    * @param string $old_version
    * @return array(
    * 'success' => bool,
    * 'messages' => array,
    * )
    */
    public function upgrade( $new_version, $old_version ) {

    $result = [
    'success' => true,
    'messages' => [],
    ];

    foreach ( self::$components as $component ) {
    $comp = $component::instance();
    $upgrade_result = $comp->upgrade( $new_version, $old_version );
    $result['success'] &= $upgrade_result['success'];
    $result['messages'][] = $upgrade_result['message'];
    }

    return $result;
    }

    Thanks Jörn for the plugin, it’s really helping a lot with maps.

Viewing 1 replies (of 1 total)

The topic ‘Version 1.6.0 breaks wp-admin’ is closed to new replies.