Closed (fixed)
Project:
Openlayers
Version:
6.x-1.x-dev
Component:
OpenLayers API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2009 at 16:44 UTC
Updated:
3 Mar 2010 at 23:00 UTC
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
Comment #1
phayes commentedNo 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.
Comment #2
phayes commentedComment #3
zzolo commentedI 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:
Comment #4
phayes commentedVery 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'
Comment #5
phayes commentedUnable to replicate. Things must have changed in the latest version of cck.