Closed (duplicate)
Project:
Openlayers
Version:
6.x-2.0-alpha10
Component:
OL API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2010 at 21:43 UTC
Updated:
17 Jun 2012 at 11:38 UTC
Getting the above error with Drupal 6.19 with openlayers 6.x-2.0-alpha10
When on the Manage fields page for the openlayers cck widget field:
admin/content/node-type/<some_openlayers_node_type>/fields/<some_openlayers_cck_field>
Fixed by removing the references in the affected function:
In sites/all/modules/openlayers/modules/openlayers_cck/openlayers_cck.module l306
//function openlayers_cck_widget(&$form, &$form_state, $field, $items, $delta = 0) {
function openlayers_cck_widget($form, $form_state, $field, $items, $delta = 0) {
The function didn't seem to require any of their arguments to be passed by reference.
Note I haven't tested it yet. I'll comment here if these raise issues elsewhere
Comments
Comment #1
zzolo commentedPlease note that our work was taken from here:
http://www.lullabot.com/articles/creating-custom-cck-fields
This is not to say that your change is not correct, but we definitely need to test this, as that example is from one of the cck maintainers.
Comment #2
dgastudio commentedsame problem
Comment #3
tmcw commentedWhat version of CCK are you using? I can't recreate this problem with CCK 2.8 or CCK 3.0.
Comment #4
dgastudio commented6.3.dev
Comment #5
zzolo commentedIts hard to support development versions of modules as it is a moving target. Maybe there is a specific issue or commit that is the reason for this change so that we can begin to look at updating our module to work appropriately for the current stable and future versions.
Comment #6
bc commentedI think that this type of issue is related to php 5.3 support in CCK: see http://drupal.org/node/705512
The function def. in openlayers_cck should have the references, but cck calls that function with &s when it isn't needed.
Comment #7
fonant commentedYes, this is a PHP 5.3 issue, the later version of PHP being more careful about how things are passed to functions.
Comment #8
fonant commentedRe-opened as the linked CCK patch doesn't fix this for me.
Comment #9
dasjosubscribe
having the same problem with cck 2.8 + openlayers 6.x-2.0-alpha10 and php 5.3
getting the error when
- editing a geocoder field in admin/content/node-type/my-node-type/fields/my-field
- editing a node with the field attached.
my WKT field gets populated with GEOMETRYCOLLECTION() which causes maps to not display properly. though i'm not 100% sure if the above error causes this behavior
Comment #10
tmcw commentedFonant: please respond on the other thread; this is a CCK issue, rather than an OpenLayers issue, and will not be fixed here.
dasjo: also check the other thread. The problem you're seeing is in geocoder, most likely, not OpenLayers.
Comment #11
ccardea commentedSorry to open this up again. I've read through the CCK thread referenced above. There are many reports that their patch has fixed the issue for CCK. Their patch has been committed and I've verified that it is installed on my machine, but it doesn't fix the problem for Openlayers. I've looked through about 10 pages of issues and can't find a duplicate in this queue. If someone has solved this for Openlayers, please let me know.
Comment #12
ccardea commentedThe error message states that the problem occurs (value given (instead of reference)) in includes/modules.inc at line 462, which is the module_invoke() function. It looks like another function is calling module_invoke() with the wrong parameters? I'm a little fuzzy on how this all works together.
A comment from API docs:
"It is useful to realize that the args passed to invoked functions are not passed by reference with calls to module_invoke() (or to module_invoke_all(), for that matter)."
So who is calling openlayers_cck_widget() using module_invoke()? The problem goes away by changing the widget type from openlayers_geocoder to openlayers_map. Hmmm.
Comment #13
ccardea commentedI used the fix in the original post as a quick fix. It doesn't seem to have any ill effects so far. The real problem seems to be the call to module_invoke() in openlayers_geocoder.
Comment #14
ccardea commentedI've provided a patch in openlayers_geocoder that provides a solution without changing the function signature.
http://drupal.org/node/1074436#comment-4144684
Comment #15
tmcw commentedThis is a duplicate ticket, then? This module is not OpenLayers Geocoder.
Comment #16
ccardea commentedI think the duplicate tag is misleading, since there is no duplicate issue here. It sent me on a wild goose chase.
Comment #17
tmcw commentedWorks as designed, then.
Comment #18
leramulina commentedI have
Drupal 6.24
CCK 6.x-3.0-alpha3
Openlayers 6.x-2.0-beta1
Geocoder 6.x-2.0-alpha5
I used patches from here http://drupal.org/node/1074436
And it did not help me
Comment #19
steinmb commentedRead through this thread and quite sure that it is a duplicate of #1074436: warning: Parameter 1 to openlayers_cck_widget() expected to be a reference that work around PHP 5.3.x related warnings/problems. Closing. Pls. test the rerolled patch.