When I create an OpenLayers View I end up getting a white screen for my whole site.

Steps I took:
1. Create an "Location" content type
2. Made an OpenLayers preset
3. Add a location field of type OpenlayersWKT display with Openlayers Map
4. Enter test data into node
5. Create View (node view)
6. Create a OpenLayers Data display specify the OL WKT field, node title, content:Description; Filter: Node Publshed=Yes, Node Type=Location
7. Set the display options to use a custom OpenLayers preset
8. Save the view
9. Enable and activate the View Layer inside of the OL preset.
10. Go to View and create a block display
11. Set the block display style to Open Layers Map
12. Save the View - Here is where I see the white screen.
13. I have to disable openlayers module to get my site running again.

I am getting quite a few Open Layers errors in my Watchdog.

error:
Message Layer not found.
Location http://dp2.devsites.com/admin/build/openlayers/presets
Referrer http://dp2.devsites.com/admin/build/views/list

error:
Message: Layer cmf_show_node_info not found.
Location http://dp2.devsites.com/admin/build/openlayers/presets/cmf_show_node_inf...
Referrer http://dp2.devsites.com/admin/build/openlayers/presets/cmf_show_node_inf...

Let me know if you need more information.

Does anyone else experience this problem when building a view?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tmcw’s picture

Can you clear your caches, and increase your error reporting level?

gmclelland’s picture

Right now PHP it is set to: error_reporting = E_ALL & ~E_NOTICE
What would you like me to set it too? error_reporting = E_ALL & ~E_NOTICE | E_STRICT ?

I cleared my caches, but still the white screen when I enable the OL module.

Thanks

tmcw’s picture

Yes, that reporting level should do the trick. Are there any messages printed to the screen when you disable OpenLayers and things start working again?

gmclelland’s picture

Well I changed it and then reloaded Apache and still I get a white screen unless I disable the Openlayers module or delete the openlayers view I created. I'm not seeing any error or messages printed out.

gmclelland’s picture

I did just see this error message popup

* warning: Invalid argument supplied for foreach() in /var/aegir/platforms/drupal/drupal-6.16/sites/dp2.devsites.com/modules/ctools/includes/export.inc on line 314.
* warning: Invalid argument supplied for foreach() in /var/aegir/platforms/drupal/drupal-6.16/sites/dp2.devsites.com/modules/ctools/includes/export.inc on line 314.

zzolo’s picture

@gmclelland, if you get a white screen, you should have an error message in your PHP log. Can you provide that?

gmclelland’s picture

FileSize
464.38 KB

Here is my error log. For what it is worth. I was seeing the white screens on May 4th and 5th.

zzolo’s picture

@gmclelland, I appreciate you attaching that, but thats not very realistic to debug. :) What you should do is perform the actions that it takes to reproduce the white screen, then send the last maybe 10 entries right when the white screen shows up. Thanks.

tmcw’s picture

So... you're getting segmentation faults. That's kind of insane. One thing to look at is the fact that the garbage collector in apc is complaining that code has been cached for over seven days. If you can restart that, so that you're sure that all code is fresh, that might help, but otherwise you might want to look into the fact that a bunch of PHP 5 builds are unstable.

gmclelland’s picture

Thanks for the feedback. Here is a little more information.

After I cleared the log, the only error I got in the log when I enabled the Open Layers module was:
[Thu May 06 12:25:43 2010] [notice] child pid 3690 exit signal Segmentation fault (11)

I wasn't seeing this error until I enabled the OL module.

I tried going to my sites homepage and here was the error that was displayed:
Fatal error: Cannot access empty property in /var/aegir/platforms/drupal/drupal-6.16/sites/dp2.devsites.com/modules/cck/includes/views/handlers/content_handler_field.inc on line 172

If I go into the database and manually disable the block that was created by an open layers view, everything comes back to normal.

If it is APC related, I'm not sure how to fix it. I'm running the server with Ubuntu and their LAMP packages.

Hope that helps

tmcw’s picture

Category: bug » support

It seems like there's something off with your view itself, if what's complaining is the field handler?

carlosbedia’s picture

I ran across this same issue, I realized I could only see the map when I was logged in as Admin! Ding! Permissions for any fields being displayed by the map! Fixed for me.

zzolo’s picture

@gmclelland, have you been able to figure this out?

carlosbedia’s picture

Now I am getting whitescreen when i log in.

zzolo’s picture

Hi @carlosbedia. A white screen means that a PHP error has occurred but it is not displayed on the screen. Can you check your logs for the specific error? Thanks.

tmcw’s picture

Any updates on this scenario from carlosbedia or gmclelland?

gmclelland’s picture

I finally gave up and deleted the problematic view. After that I haven't seen any problems.

zzolo’s picture

Status: Active » Closed (fixed)

Well, repoen if necessary.

steinmb’s picture

Version: 6.x-2.0-alpha6 » 6.x-2.0-alpha8
Priority: Normal » Major
Status: Closed (fixed) » Active

I reopen this then it is still there in alpha8 with PHP 5.2.x
PHP Fatal error: Cannot access empty property in /var/www/websites/tbsk/tbsk.no/drupal/sites/all/modules/cck/includes/views/handlers/content_handler_field.inc on line 174
The view works OK then I'm logged in as user1 and logged out and running as anonymous, logged in as any other user group give me a WSOD.
- No access restriction to the View it self
- Not a caching issue
I can confirm that if you create a view where the user group does not have view access to the data you get a WSOD. Easy to reproduce.

Should we not have a better warning then a WSOD when a user try something like this?

zzolo’s picture

Priority: Major » Normal

Hi @steinmb.

The error message you put up suggests that this is a problem with Views itslef, and maybe just something on your site.

A good way to debug is to recreate the same OL Data Overlay View, but with a different plugin (like an HTML table) to see how that works.

A WSOD is due to how you have PHP error messaging set up, not something that Drupal specifically does.

steinmb’s picture

Thanx, I'll have a look later today. If it turns out to be be a view issue I'll prob. move this issue to the correct project.

AmyJohnson’s picture

I've been having this same problem in different places. I finally deleted most of my site, reloaded openlayers, and most of my issues disappeared. Right now though, it is occuring when I go to the Administer->site building->openlayers view. Let me know if you want me to research it further. Otherwise, I'm just going to follow this thread.

zzolo’s picture

Hi @asjohns1000. The information is helpful and important, but very hard to debug without an error message. A whitescreen means that a PHP error has occurred, but due to settings, they are not printed to the screen; this means, you should go to your PHP error log and look at (and let us know) about the error(s) that occurred. Thank you.

Rob C’s picture

i dunno what's going wrong here, but i got this on a fresh installed Debian box with a fresh installed Drupal site with cck/views/openlayers only. Only started to use 2.x a couple days ago (did try it in the past, but it was just not usable for what i needed. With 2.0 and vectors / zoom to etc support, this is a new story, so i just gave it a try)

got a big fat whitescreen, this is the only thing in the /var/log/apache/error.log file
[Tue Aug 24 02:41:03 2010] [notice] child pid 8773 exit signal Segmentation fault (11)

and on my live server on a test site i get:
[Tue Aug 24 04:59:15 2010] [notice] mod_fcgid: process /var/www/htdocs/index.php(5695) exit(communication error), terminated by calling exit(), return code: 0
[Tue Aug 24 05:28:17 2010] [notice] mod_fcgid: call /var/www/htdocs/index.php with wrapper /var/www/php5-fcgi-starter

using only stable modules (cck/views) and openlayers latest version.

i tried to use this page as a 'guide'
http://drupal.org/node/627816

and i tried this also with the geocoder (cause i really need that) and a WKT point, same result
and also tried it all with a local copy of openlayers.

and i still get the 'layer not found' errors and the 'Layer add not found' is also still there.
shall i update to head? and see what it does or hold till the next release?
or try the whole * thing again with Drupal 6.17 / 6.18 ? i'm now on 6.19

keep it up!

Robin

tmcw’s picture

AllRob - what versions of PHP are you running? Can you run your live server with mod_php rather than php-fcgi? If you have APC running on either system, you'll probably need to restart Apache.

Rob C’s picture

hey tmcw

on the live server, fcgi is required, so i can't go around it, but i can on the test server, so let's focus on that

test server specs: box installed yesterday with latest Debian (5) CD:
Apache/2.2.9 (Debian)
PHP/5.2.6-1+lenny9 with Suhosin-Patch (debian package libapache2-mod-php5 aka mod-php)

no apc, or any other mod that deals with caching
it's a clean box, clean debian install, apache2, php5, mysql, the php gd module, php curl module, php geoip, php mcrypt, pear, command line
and that's all

thanks for all the work on the module, and the quick reply! i'll try to supply you with everything you need to debug this, can also give you shell access if you request it. (it's a virtual machine).

Robin edit. corrected the mod's name

Rob C’s picture

reinstalled it again (3 freaking times)
i can not really understand this, from my backup i can see that i did not press override on the views display before adding the page view,
but i am almost sure i did it the first 3 times, more sleep less caffeine? who knows, ill keep my eye on this, sorry for taking some of your time.

zzolo’s picture

@AllRob, a bit confused by your last post. Did you get it to work?

Rob C’s picture

Yes zzolo i did :)
Like i explained, i could see i did not clicked the override button from my database backup i made (sorry for the typo).

zzolo’s picture

Status: Active » Fixed

Good to hear! Closing ...

Status: Fixed » Closed (fixed)

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

scriptaimago’s picture

Thanx to all
If I load the map in a node using a cck field, the map shows, but when I use views I need to be logged as administrator or to have rights to administer contents to view it. I still don't get how to solve it. It really is annoying, 'cause the openlayers module is really awesome (and I still haven't push to it's limits)

Is it a problem with the version of PHP I'm using?
If so, can anyone suggest a version of php for centOs that allows openlayers and views to work properly?

Thank you, Lorenzo

tmcw’s picture

Are you sure that there aren't permissions set on the CCK fields which prevent you from viewing them?

scriptaimago’s picture

I wish! all CCK fields permissions are set to be seen (view) by all roles!
I also have content access installed but I think has nothing to do with this issue; the point is: if I can access the openlayers cck field why shouldn't I be able to access the view that uses the same field? it's obviously something concerning views and openlayers. I'm stuck

zzolo’s picture

Status: Closed (fixed) » Active

Hi @scriptaimago. Are you still getting a whitescreen? If it is a whitescreen, that it pretty much has to be a PHP error of some sort.

If you get an Access Denied page, then it is Drupal that is having a permission issue with that user. Did you set the permissions on the view, per chance?

scriptaimago’s picture

zzolo, the view has unrestricted access. If I deny "administer nodes" privileges to administator, even the latter will get a whitescreen on the view or a node the view is attached to or a panel where the view is embedded into.

Therefore it must be, as you say, a PHP problem. I was wondering if this all issue could be related to the version of PHP (5.2) running on my server
Any suggestion is very welcome, thanks zzolo. Lorenzo

zzolo’s picture

So, @scriptaimago, you'll want to check your PHP error logs when you get the white screen to see what is the problem. Once you provide that, we can attempt to debug it some. You should also look at the Drupal logs as well.

scriptaimago’s picture

I zzolo thank you very much for your support.
I have upgraded my php version to 5.2.14 but nothing changed, still getting a whitescreen when I load the view with openlayers.

I've, therefore, enabled errors on my index.php file. This is the error I get

Fatal error: Call to a member function use_count_query() on a non-object in /var/www/vhosts/cosedisale.com/httpdocs/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc on line 1082
I've looked up on the net and I found out that there might be problems with openlayers_views_style_map.inc file

I'm stuck, hope my report helps you to find out where the problem is! the url I'm having problems is
http://cosedisale.com/content/kenya (map processed via the views module)
As you know the page is visible from those users who have access to node administration (as shown in the screenshot). All others, who haven't "administer nodes" permission granted, get a whitescreen

In this other url I've set up a node (with an openlayers CCK field) work just fine
http://cosedisale.com/

The function (/var/www/vhosts/cosedisale.com/httpdocs/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc on line 1082) that returns the error is:

      if ($this->pager->use_count_query() || !empty($view->get_total_rows)) {
        $this->pager->execute_count_query($count_query, $args);
      }
itserich’s picture

Got this error when I enabled a map in a view.

Fatal error: Cannot access empty property in /home/missingp/public_html/sites/all/modules/cck/includes/views/handlers/content_handler_field.inc on line 174

Error does not occur when User 1 logged in, does occur with anon and auth users.

EDIT [I think] The problem was a OpenLayer map had been made the first field in a view and had not been granted permission.

scriptaimago’s picture

@itserich. I don't know whether your reply was intended to help solve my problem. If so thank you anyhow, but the problem is not in the view itself or due to field access permission. They are all granted.

@zzolo, any idea?

thank you all, Lorenzo

tmcw’s picture

So, you're having a problem with the pager in views, possibly as a result of upgrading Views, or configuring it a certain way? This doesn't have much to do with OpenLayers: can you add an export of the view or something?

scriptaimago’s picture

Sure tmcw.
I've got installed views 6.x-3.0-alpha3
By the way, if I change the style output of the view to "table" a result is shown fine with all the geometry points listed as they should.
Thanks for your help

$view = new view;
$view->name = 'map';
$view->description = 'map';
$view->tag = 'map';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 3.0-alpha1;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Predefinite */
$handler = $view->new_display('default', 'Predefinite', 'default');
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['use_more_text'] = 'leggi tutto';
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['submit_button'] = 'Applica';
$handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Pulisci';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'openlayers_data';
$handler->display->display_options['style_options']['data_source'] = array(
  'value' => array(
    'openlayers_wkt' => 'openlayers_wkt',
  ),
  'other_lat' => 'field_latitudine_value',
  'other_lon' => 'field_longitudine_value',
  'openlayers_wkt' => 'field_dove_openlayers_wkt',
  'other_top' => 'field_dove_openlayers_wkt',
  'other_right' => 'field_dove_openlayers_wkt',
  'other_bottom' => 'field_dove_openlayers_wkt',
  'other_left' => 'field_dove_openlayers_wkt',
  'name_field' => 'title',
  'description_field' => 'markup',
);
/* Campo: Contenuto: dove (field_dove) */
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['id'] = 'field_dove_openlayers_wkt';
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['table'] = 'node_data_field_dove';
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['field'] = 'field_dove_openlayers_wkt';
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['label_type'] = 'none';
$handler->display->display_options['fields']['field_dove_openlayers_wkt']['format'] = 'openlayers_wkt';
/* Campo: Nodo: Titolo */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['exclude'] = TRUE;
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 1;
$handler->display->display_options['fields']['title']['alter']['text'] = '<h2 class="titolo-principale">[title]</h2>';
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Campo: Contenuto: aggiungi immagine (field_img_asc) */
$handler->display->display_options['fields']['field_img_asc_fid']['id'] = 'field_img_asc_fid';
$handler->display->display_options['fields']['field_img_asc_fid']['table'] = 'node_data_field_img_asc';
$handler->display->display_options['fields']['field_img_asc_fid']['field'] = 'field_img_asc_fid';
$handler->display->display_options['fields']['field_img_asc_fid']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_img_asc_fid']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_img_asc_fid']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_img_asc_fid']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_img_asc_fid']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_img_asc_fid']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_img_asc_fid']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_img_asc_fid']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_img_asc_fid']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_img_asc_fid']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_img_asc_fid']['link_to_node'] = 1;
$handler->display->display_options['fields']['field_img_asc_fid']['label_type'] = 'none';
$handler->display->display_options['fields']['field_img_asc_fid']['format'] = 'thumbnail_linked';
$handler->display->display_options['fields']['field_img_asc_fid']['multiple']['group'] = 1;
$handler->display->display_options['fields']['field_img_asc_fid']['multiple']['multiple_number'] = '1';
$handler->display->display_options['fields']['field_img_asc_fid']['multiple']['multiple_from'] = '0';
$handler->display->display_options['fields']['field_img_asc_fid']['multiple']['multiple_reversed'] = 0;
/* Campo: Contenuto: sottotitolo (field_sub_title) */
$handler->display->display_options['fields']['field_sub_title_value']['id'] = 'field_sub_title_value';
$handler->display->display_options['fields']['field_sub_title_value']['table'] = 'node_data_field_sub_title';
$handler->display->display_options['fields']['field_sub_title_value']['field'] = 'field_sub_title_value';
$handler->display->display_options['fields']['field_sub_title_value']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_sub_title_value']['alter']['alter_text'] = 1;
$handler->display->display_options['fields']['field_sub_title_value']['alter']['text'] = '<h3 class="sottotitolo-principale">[field_sub_title_value]</h3>';
$handler->display->display_options['fields']['field_sub_title_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_sub_title_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_sub_title_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_sub_title_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_sub_title_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_sub_title_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_sub_title_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_sub_title_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_sub_title_value']['link_to_node'] = 1;
$handler->display->display_options['fields']['field_sub_title_value']['label_type'] = 'none';
/* Campo: Contenuto: latitudine (field_latitudine) */
$handler->display->display_options['fields']['field_latitudine_value']['id'] = 'field_latitudine_value';
$handler->display->display_options['fields']['field_latitudine_value']['table'] = 'node_data_field_latitudine';
$handler->display->display_options['fields']['field_latitudine_value']['field'] = 'field_latitudine_value';
$handler->display->display_options['fields']['field_latitudine_value']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_latitudine_value']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_latitudine_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_latitudine_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_latitudine_value']['label_type'] = 'none';
$handler->display->display_options['fields']['field_latitudine_value']['format'] = 'unformatted';
/* Campo: Contenuto: longitudine (field_longitudine) */
$handler->display->display_options['fields']['field_longitudine_value']['id'] = 'field_longitudine_value';
$handler->display->display_options['fields']['field_longitudine_value']['table'] = 'node_data_field_longitudine';
$handler->display->display_options['fields']['field_longitudine_value']['field'] = 'field_longitudine_value';
$handler->display->display_options['fields']['field_longitudine_value']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_longitudine_value']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_longitudine_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_longitudine_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_longitudine_value']['label_type'] = 'none';
$handler->display->display_options['fields']['field_longitudine_value']['format'] = 'unformatted';
/* Campo: Customfield: Markup */
$handler->display->display_options['fields']['markup']['id'] = 'markup';
$handler->display->display_options['fields']['markup']['table'] = 'customfield';
$handler->display->display_options['fields']['markup']['field'] = 'markup';
$handler->display->display_options['fields']['markup']['label'] = '';
$handler->display->display_options['fields']['markup']['exclude'] = TRUE;
$handler->display->display_options['fields']['markup']['alter']['alter_text'] = 1;
$handler->display->display_options['fields']['markup']['alter']['text'] = '<div class="canvas">[field_img_asc_fid]<div>[field_sub_title_value]</div></div>';
$handler->display->display_options['fields']['markup']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['markup']['alter']['trim'] = 0;
$handler->display->display_options['fields']['markup']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['markup']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['markup']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['markup']['alter']['html'] = 0;
$handler->display->display_options['fields']['markup']['hide_empty'] = 0;
$handler->display->display_options['fields']['markup']['empty_zero'] = 0;
$handler->display->display_options['fields']['markup']['format'] = '1';
/* Parametro: Taxonomy: Termine */
$handler->display->display_options['arguments']['name']['id'] = 'name';
$handler->display->display_options['arguments']['name']['table'] = 'term_data';
$handler->display->display_options['arguments']['name']['field'] = 'name';
$handler->display->display_options['arguments']['name']['style_plugin'] = 'default_summary';
$handler->display->display_options['arguments']['name']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['name']['glossary'] = 0;
$handler->display->display_options['arguments']['name']['limit'] = '0';
$handler->display->display_options['arguments']['name']['case'] = 'lower';
$handler->display->display_options['arguments']['name']['path_case'] = 'lower';
$handler->display->display_options['arguments']['name']['transform_dash'] = 1;
$handler->display->display_options['arguments']['name']['add_table'] = 1;
$handler->display->display_options['arguments']['name']['require_value'] = 0;
/* Filtra: Nodo: Tipo */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'layout' => 'layout',
);
/* Filtra: Taxonomy: Vocabolario */
$handler->display->display_options['filters']['vid']['id'] = 'vid';
$handler->display->display_options['filters']['vid']['table'] = 'term_data';
$handler->display->display_options['filters']['vid']['field'] = 'vid';
$handler->display->display_options['filters']['vid']['value'] = array(
  '2' => '2',
);
/* Filtra: Contenuto: dove (field_dove) */
$handler->display->display_options['filters']['field_dove_openlayers_wkt']['id'] = 'field_dove_openlayers_wkt';
$handler->display->display_options['filters']['field_dove_openlayers_wkt']['table'] = 'node_data_field_dove';
$handler->display->display_options['filters']['field_dove_openlayers_wkt']['field'] = 'field_dove_openlayers_wkt';
$handler->display->display_options['filters']['field_dove_openlayers_wkt']['operator'] = 'not empty';
$handler->display->display_options['filters']['field_dove_openlayers_wkt']['case'] = 1;

/* Display: dove */
$handler = $view->new_display('openlayers', 'dove', 'dove');
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['defaults']['row_options'] = FALSE;

/* Display: mappa filtrata */
$handler = $view->new_display('page', 'mappa filtrata', 'mappa_filtrata');
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'openlayers_map';
$handler->display->display_options['style_options']['preset'] = 'camps';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['path'] = 'content/mappa';
quardz’s picture

I too have the same problem. When i try to add/Edit/Clone the presets.

zzolo’s picture

Hi @quardz. You may be seeing the same behavior, but the problem could be very different. Can you provide the following:

* OpenLayers module version
* Views version
* Error message

Thank you.

scriptaimago’s picture

Hi all,
those who read my last comment, might had the impression that I solved the problem. I wish, but that isn't so.

@tmcw Thanx anyway. I doubt the problem is strictly related on the views pager. There'd be no explanation why a user with "administer nodes privileges" is able to see the map. I doubt it all can be issued to the "pager" system of views (pager has no rights). I assume that an object (like a field value) isn't sent to views (or can't be read because its format) and this generates the error. Or something like that

@zzolo If you want I can send you via email a user detail so that you can login with all admin privileges. Would that help you somehow?

By the way the overlay layer produced to expose all geometry points (http://cosedisale.com) can be seen by all browser except IE (version 7)

tmcw’s picture

I doubt the problem is strictly related on the views pager.

The problem is pretty clearly coming from an empty property on the pager, from the debugging information you've given.

Possibly try disabling AJAX on the OpenLayers Data view? Neither OpenLayers Data displays nor OpenLayers Map style plugins support AJAX. Also make sure that the WKT field that you're using is set to display itself as a WKT value instead of a map.

archnode’s picture

I have the same problem: Map displays only if the user is "user 1", otherwise wsod. The problem probably lies within the Openlayers Map Display Plugin, because if I use views 3 to disable query rewriting for this view, the map displays (although the point, that should appear on the map doesn't).

scriptaimago’s picture

Hi, and thank you very much tmcw,

Disabled "Ajax" everywhere in all displays in the View.
I've also disabled boost (I thought it could have been a caching issue).
On content type "layout", the WKT field is configured as an OpenLayers WKT (OpenLayers Map is the only available option)
On Openlayers Data view, the WKT field is displayed as a WKT value on the as you suggested.

Page still returns a whitescreen display for roles that do NOT have privilege to administer nodes.

I'm going slightly mad (F. Mercury)

Remon’s picture

Priority: Normal » Critical

Guys, this is really serious, I can't get openlayers views to work on views 3 either.

tmcw’s picture

While this issue is serious, it's also exceptionally hard to debug because there are a thousand or two perfectly working installations and then a few that whitescreen, and none of the core developers have been able to replicate the problem. If you can submit incredibly detailed bug reports - as in, PHP version, Drupal version, precise views version, logs, views setups, then that would make this more possible to debug.

Remon’s picture

Version: 6.x-2.0-alpha8 » 6.x-2.0-alpha9

Well, here is a little bit more detailed report:

PHP 5.2.13
Views 6.x-3.x-dev / 2010-Oct-17
Drupal 6.19

Actually, the view works only for user1, but displays the following error for other authenticated / anonymous users:

Fatal error: Call to a member function use_count_query() on a non-object in /var/www/html/dev/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc on line 1123
Remon’s picture

Guys, it turned out the openlayers view works only if I disable workflow_access module! at the same time, I can't accuse workflow of the "Fatal error" cause the same view used for openlayers works correctly if I choose another display type. Any clues?
Thanks

ahtih’s picture

Category: support » bug

I encountered this too, with Views 3 and "Content Access" installed. It seems to be a real OpenLayers and/or Views issue.

Detailed sequence of events:
* openlayers_views_style_map::query() sets $this->view->built=TRUE;
* therefore $view->build() never calls $this->query->build(), thus $view->build_info['query'] remains empty string and $view->query->pager remains unset
* $view->query->execute() calls db_rewrite_sql() on empty query string. If any node access modules are installed and you are not admin, this usually appends a bunch of JOINs/WHEREs to our empty query string and it will no longer be empty
* $view->query->execute() then checks if query string is empty (plugins/views_plugin_query_default.inc:1063 in Views 3). If so, it does not run the query; otherwise, it decides to run the query and inevitably encounters problems, the first being the missing pager.

Node access modules in this case do everything correctly. Failure is caused by OpenLayers hacking Views to prevent SQL query from being run, and Views in its current state apparenly has no way of doing that properly.

I think Views could be patched to not call db_rewrite_sql() on empty string. Otherwise, the check for empty query string seems pointless, as db_rewrite_sql() can make it non-empty whenever it wants. Looking at the code, Views 2 seems to have the same problem.

As a workaround, I made my view to be a Files view, not Node view. "Content Access" only deals with nodes, so db_rewrite_sql() does nothing with Files in my setup.

Remon’s picture

@ahtih, this was a perfect debugging I have to say :). btw, if you have latest views 3.x-dev, you'll find an option called "Disable query rewrite" from "Query settings". This will disable db_rewrite_sql().

Remon’s picture

Version: 6.x-2.0-alpha9 » 6.x-2.x-dev
Danny Englander’s picture

I seem to be having the same issue. I disabled paging in my view as well as ajax and as suggested in #54 "Disable query rewrite". I no longer get the nasty error / WSOD as described in #51 for user 1 and I am actually seeing a map now but I am still not convinced this is actually all working properly.

** Note that to avoid the error as described in #19 I had to make sure to assign permissions to anonymous / authenticated users to my Longitude and Latitude CCK fields as I am also using the content permissions addon with CCK.

OpenLayers: 6.x-2.x-dev (2010-Dec-13)
Views: 6.x-3.x-dev (2010-Dec-14)
Content Construction Kit (CCK) 6.x-2.x-dev (2010-Dec-06)
Drupal 6.19
PHP 5.2.13
MYsql: 5.0.91

Update: I have this working like a charm now. I closely followed the tutorial on http://drupal.org/node/627816 as well as paying attention to some of the comments made on that page as well as my own troubleshooting as mentioned above.

steinmb’s picture

Status: Active » Closed (fixed)

Been a wile since I last had a WSOD with OL and Views and the code is much more robust then back when this issues where started. Let's close this issue. Pls do not reopen, but create a new one if you find new bugs related to views.

Remon’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Component: OpenLayers Views » OL API
Status: Closed (fixed) » Active

Thats true, I'm getting a WSOD with Openlayers 7.2 too!

steinmb’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Component: OL API » OL Views
Status: Active » Closed (fixed)

@Remon, pls do not reopen this issue. Create an new issue, and if you don't mind, provide a bit more information where you get it, and what errors you find in your logfiles and/or php-erro-log after the WSOD.

bsandor’s picture

Hi,

As @steinmb asked it: I'm not opening this issue.

However I couldn't solve this problem.
What's the conclusion? It's working with Views 3 only? (#56 ???)

Having WSOD with
OL 6.x-2.0-beta1 or 6.x-2.x-dev (2012-Mar-24),
Views 6.x-2.16.
PHP 5.2 or 5.3

blattmann’s picture

Just a quick note. I get the WSOD trying to edit and save a preset sometimes when there is a problem with a data layer. For example, through a migration a KML was not properly copied to a new deployment. When I tried to edit a preset, I got WSOD. All I had to do was disable the layer in question, save preset. Then reenable the layer. Voila! Perhaps this will also work for other people.

I guess this is not 100% related to the issue raised in this post, since it wasn't really linked to a View.