• Hi,

    The plugin is saying that the API key is invalid.

    However if I try accessing the openspace.js file directly using my API key it DOES work e.g.
    https://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key=MY-API-KEY&v=4.0.0&debug=true&url=https%3A%2F%2Fwww.my-domain.com%2

    I edited the plugin file manually and managed to get it to work without giving the warning… you need to add the URL.

    /plugins/os-openspace-maps/os-openspace-maps.php
    Line #154 – change to:

    $result = wp_remote_get( osmap_get_script_url() . '?key=' . esc_attr($key) . '&url=https%3A%2F%2Fwww.my-domain.com%2F', $args );

    I guess the plugin should have an extra setting field to specify the registered URL for the API key.

    Also, there are quite a few PHP notice errors when trying to save the plugin settings form:

    Notice: Undefined index: mousewheel in /plugins/os-openspace-maps/osmap_admin_options.php on line 235

    Notice: Undefined index: res_2500 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_1000 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_500 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_200 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_100 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_50 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_25 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_10 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_4 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_3 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_2 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Undefined index: res_1 in /plugins/os-openspace-maps/osmap_admin_options.php on line 240

    Notice: Use of undefined constant timeout – assumed ‘timeout’ /plugins/os-openspace-maps/os-openspace-maps.php on line 153

    Thanks,

  • The topic ‘Plugin says working API key is invalid’ is closed to new replies.