While adding/editing maps (admin/structure/openlayers/maps/add for example) I am getting next php strict warning

Strict warning: Declaration of openlayers_behavior_boxselect::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_get_class() (line 841 of /home/ivica/moje/bin/lampp_new/htdocs/unicef-microsite/sites/all/modules/contrib/ctools/includes/plugins.inc).

Using php 5.3.5, drupal 7.8, ctools 7.x-1.0-rc1 and openlayers 7.x-2.0-alpha2

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pivica’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
FileSize
467 bytes

Here is a patch for latest dev.

lathan’s picture

tested patch works :)

also getting a views render issue.

Strict warning: Declaration of openlayers_views_style_data::render() should be compatible with that of views_plugin_style::render() in require_once() (line 17 of ..../sites/local.mobiletoolbox.co.za/modules/openlayers/modules/openlayers_views/views/openlayers_views_style_data.inc). 
lathan’s picture

Fix for that views render().... in openlayers_views/views/openlayers_views_style_data.inc

change

class openlayers_views_style_data extends views_plugin_style {
 
   /**
   * Render the map features.
   *
   * Overrides views_plugin_style->render
   */
  function render($result) {
    $grouped_results = $this->render_grouping($result, $this->options['grouping']);
    $data = $this->map_features($grouped_results);
    
    // If we are not in preview, just return the data
    if (empty($this->view->live_preview)) {
      return $data;

TO this.... and voila

class openlayers_views_style_data extends views_plugin_style {
 
   /**
   * Render the map features.
   *
   * Overrides views_plugin_style->render
   */
  function render() {
    $grouped_results = $this->render_grouping($this->view->result, $this->options['grouping']);
    $data = $this->map_features($grouped_results);
zzolo’s picture

Status: Active » Fixed

@jucallme, thanks for the patch! Committed.

Can you actually open another ticket for the Views issue? Also, can you explain why your patch fixes the problem, as I am just not sure why that needs to be done.

Many thanks!

das-peter’s picture

Status: Fixed » Needs review
FileSize
37.31 KB

Reopened because there's left a whole bunch of such warnings.
Attached patch contains fixes for all locations where I've found such incompatible method declarations.
Additionally there are some trailing white-space fixes - let me know if you prefer a patch without those.

eMPee584’s picture

Status: Needs review » Reviewed & tested by the community

regarding patch #5:
Lo0king g0od, huge improvement to openlayers code quality...
That's a lot of effort you put into the patch, thx das-peter ;)

zzolo’s picture

zzolo’s picture

Status: Reviewed & tested by the community » Needs work

Hey @das-peter. Thanks for the patch. Yeah, the white space changes make it hard to review since its a it difficult to see the real changes. Also, it does not apply anymore. Do you mind re-rolling it without the whitespace changes? Thank you.

das-peter’s picture

Status: Needs work » Needs review
FileSize
17.92 KB

Here we go - re-rolled against latest dev and patch created with --ignore-space-at-eol.

das-peter’s picture

Oops, looks like I forgot to fix two locations - updated patch.

lathan’s picture

some more are missing... http://cl.ly/1P2N1J37010N1d3g2H34

lathan’s picture

lathan’s picture

FileSize
2.15 MB

Sorry for the million posts here just have not got the time right now to roll this stuff here is an older port of the alpha with all this stuff fixed and and a working copy of the openlayers_plus module.... (why thats not on d.o. yet i have no clue)

hope this helps..

nod_’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
17.12 KB

#10 looks good to me. no more notice running tests. one file didn't apply cleanly. reroll attached.

I haven't tried #13

casey’s picture

Priority: Minor » Normal
FileSize
16.13 KB

Reroll + fixes for openlayers_views_style_data::render() and openlayers_layer_type_openlayers_views_vector::options_form()

Also, definitely not minor.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1278684.patch, failed testing.

casey’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
18.02 KB
petsagouris’s picture

#17: 1278684.patch queued for re-testing.

nod_’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! committed to 7.x-2.x and 7.x-3.x

Status: Fixed » Closed (fixed)

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

ressa’s picture

I am getting this warning:
Strict warning: Declaration of views_geojson_bbox_argument::query() should be compatible with that of views_handler_argument::query() in require_once() (line 11 of /www/website/sites/all/modules/views_geojson/views/views_geojson_bbox_argument.inc).

Using:
GeoJSON, version = "7.x-1.0-alpha2"
OpenLayers, version = "7.x-2.0-beta1+54-dev"

Should I perhaps open a ticket under GeoJSON in stead?

h3rj4n’s picture

Status: Closed (fixed) » Needs work

As said in issue #1365578, the errors are back:

    Strict warning: Declaration of openlayers_layer_type_tms::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_google::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_raw::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_kml::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_cloudmade::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_xyz::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_geojson::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_yahoo::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_virtualearth::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_wms::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_maptiler::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_osm::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_layer_type_openlayers_views_vector::options_form() should be compatible with that of openlayers_layer_type::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_views_style_data::render() should be compatible with that of views_plugin_style::render() in _registry_check_code() (regel 3066 van /www/includes/bootstrap.inc).
    Strict warning: Declaration of openlayers_behavior_scaleline::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_zoombox::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_layerswitcher::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_fullscreen::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_geolocate::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_drawfeatures::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_attribution::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_cluster::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_permalink::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_mouseposition::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_boxselect::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_navigation::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_zoomtolayer::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_panzoombar::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_popup::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_panzoom::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_dragpan::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).
    Strict warning: Declaration of openlayers_behavior_tooltip::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_load_includes() (regel 475 van /www/sites/all/modules/ctools/includes/plugins.inc).

I got this after I update as follows:
OpenLayers (openlayers) 7.x-2.0-beta1+83-dev 7.x-2.0-beta1

mmll’s picture

I got

Strict warning: Declaration of openlayers_layer_type_virtualearth::options_form() should be compatible with openlayers_layer_type::options_form($defaults = Array) funktsioonis ctools_plugin_load_includes() (rida 475 / /var/www/sites/all/modules/ctools/includes/plugins.inc).

after shifting my sites to php 5.4
using openlayers 7.x-2.0-beta3

Pol’s picture

Status: Needs work » Closed (works as designed)

Beta3 doesn't include any virtualearth related stuff, see: http://drupalcode.org/project/openlayers.git/tree/b094f6080ca2eeaf72e0eb...

I suppose this is a bad upgrade.

ace11’s picture

I get this when I moved site to production server:

Strict warning: Declaration of openlayers_behavior_stylemap::options_form() should be compatible with openlayers_behavior::options_form($defaults = Array) in ctools_plugin_load_includes() (line 475 of \sites\all\modules\ctools\includes\plugins.inc).

Production server: PHP 5.4.14
Server where I build the site: PHP 5.3.18

And I'm using Open Layers 7.x-2.0-beta5

  • zzolo committed 251189d on 7.x-3.1.x authored by jucallme
    Issue #1278684 by jucallme: Bug with boxselect plugin.
    
    
  • nod_ committed b6bcb87 on 7.x-3.1.x
    Issue #1278684 by das-peter, nod_, casey : fix declaration of...