To reproduce:

1. Create an openlayers_wkt cck field with an openlayers map widget as the preset. I used a custom preset created in the preset interface.
2. Create a different field with 'unlimited' possible values. I used a file field.

When you press 'add another' to the unlimited field, you get the following error:

warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /var/www/opendev/drupal6/sites/all/modules/cck/includes/content.node_form.inc on line 379.

It's definitely openlayers, as hacking content.node_form.inc like so fixes it:

  foreach ($javascript['setting'] as $fkey => $fvalue){
    foreach ($fvalue as $skey => $svalue){
      if (strpos($skey,'openlayers') !== false){
        unset($javascript['setting'][$fkey][$skey]);
      }
    }
  }

Comments

phayes’s picture

No resolution yet, but the problem seems to be being caused by openlayers_cck_wkt_element_process being called twice during AJAX.

This is then causing openlayers_render_map to be called twice, adding two identical pieces of 'settings' to the javascript settings array, causing the array merge recursive error.

phayes’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
zzolo’s picture

I was not able to reproduce this error, but when trying I can across this JS error, when I tried to use the "Add another" button for another field (textfield) that has unlimited values:

this.div.appendChild is not a function
anonymous(["openlayers-cck-widget-map-field_test_field", "openlayers-cck-widget-map-field_test_field" 0=openlayers-cck-widget-map-field_test_field], Object projection=EPSG:4326,4326)OpenLayers.js (line 768)
anonymous()OpenLayers.js (line 116)
anonymous(Object projection=[2] width=[2] default_layer=[2])openlayers.js?r (line 114)
anonymous()openlayers.js?r (line 80)
anonymous()openlayers.js?r (line 33)
anonymous()drupal.js?r (line 42)
anonymous(Object, function(), Object name=c)jquery.j...val/seq/1 (line 1)
anonymous(Document story)drupal.js?r (line 41)
anonymous()drupal.js?r (line 277)
anonymous()jquery.j...val/seq/1 (line 1)
anonymous()jquery.j...val/seq/1 (line 1)
anonymous([function(), function()], function(), Object name=c)jquery.j...val/seq/1 (line 1)
anonymous()jquery.j...val/seq/1 (line 1)
[Break on this error] OpenLayers.Element.addClass(this.div,'ol...){this.events.on(this.eventListeners);}\n
phayes’s picture

Very strange that you can't reproduce. Still getting this in the dev version of openlayers and dev version of cck.

Setup:
1 openlayers_wkt field, single value, all feature-types allowed
1 Text, with unlimited allowed values, widget-type 'textfield'

phayes’s picture

Status: Active » Fixed

Unable to replicate. Things must have changed in the latest version of cck.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.