Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When cloning a map the machine name is automatically set to clone_of_<original-name>
e.g. clone_of_default
.
This leads to several problems:
- default - and probably any other map - can only be cloned once. After that there is a problem with the name/primary key
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'clone_of_default' for key 'PRIMARY': INSERT INTO {openlayers_maps} (name, title, description, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => clone_of_default [:db_insert_placeholder_1] ...
- clones of clones get names like
clone_of_clone_of_clone_of_default
It might be better to automatically fill in a machine name but let users change it if desired or needed.
Comments
Comment #1
PolFixed, thanks !