• Just installed and tried to create a new map.

    When I try and save, I get the message:

    Database Error. Can’t create Map!

    If I enable debugging, I get the following:

    WordPress database error: [Unknown column 'width_parameter' in 'field list']
    INSERT INTO <code>wp_mapfig_premium_map</code> (<code>title</code>, <code>width</code>, <code>height</code>, <code>width_parameter</code>, <code>height_parameter</code>, <code>show_sidebar</code>, <code>show_search</code>, <code>show_measure</code>, <code>show_minimap</code>, <code>show_svg</code>, <code>show_export</code>, <code>lat</code>, <code>lng</code>, <code>zoom</code>, <code>data</code>, <code>image_olverlays</code>, <code>layers_id</code>, <code>groups_id</code>) VALUES ('Butlers Pool', '100', '500', '%', 'px', '1', '0', '0', '0', '0', '0', '52.761814022662', '-2.7390611171722', '6', '', '', '1', '0')

    When I check the db, there is no width_parameter or height_parameter columns so I’m not sure how it can work.

    I’ve installed on 2 sites to test and see the same on both.

    It’s a bit unnerving that the last update was a year ago and things like this happen. Is it php 7.2 compatible?

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

Viewing 1 replies (of 1 total)
  • Thread Starter robwent

    (@robwent)

    Looking at /lib/upgrade.php there is a function to alter this table and add the missing parameters.

    It looks to me like the plugin installs an old version of the database, but then sets the option ‘mapfig_premium_db_version’ to 2, so the alter table functions never run.

    If anyone else runs into this, go into your db with phpmyadmin and search the option table for ‘mapfig_premium_db_version’ and then change the value from 2 to 0.

    Then reload the admin page of the site and the database tables will update and you will be able to save a map.

Viewing 1 replies (of 1 total)
  • The topic ‘Database Error. Can’t create Map!’ is closed to new replies.