Hi,

entity_views_handler_area_entity::render_entity() fails to check if the $entity loaded in line 109 is actually loaded. If it's not and comes in as FALSE, this will be passed to entity_access() and from there to entity_metadata_no_hook_node_access(), resulting in the usual "Trying to get property of non-object entity_metadata_no_hook_node_access()" warning.

Comments

djg_tram created an issue.

ehowland’s picture

I believe I have the same issue. It showed up after a recent update - presumably after the upgrade to Entity 7.x-1.6
or possibly Views 7.x-3.13

The patch in this issue:
https://www.drupal.org/node/1780646?page=1#comment-8350335
did not document this problem, but I did get a stacktrace by altering applying that patch and then moving the stacktrace and watchdog logging immediately before the following comment:

// If a non-default revision is given, incorporate revision access.

This is the stacktrace I got.

Boolean passed to entity_access() instead of a node object. Stack data follows:
Array
(
    [file] => /home5/respite2/live.respite/html/sites/all/modules/entity/entity.module
    [line] => 657
    [function] => entity_metadata_no_hook_node_access
    [args] => Array
        (
            [0] => view
            [1] => 
            [2] => 
            [3] => node
        )

)
Array
(
    [0] => entity_metadata_no_hook_node_access() at /home5/respite2/live.respite/html/sites/all/modules/entity/entity.module:657
    [1] => entity_access() at /home5/respite2/live.respite/html/sites/all/modules/entity/views/handlers/entity_views_handler_area_entity.inc:110
    [2] => entity_views_handler_area_entity->render_entity() at /home5/respite2/live.respite/html/sites/all/modules/entity/views/handlers/entity_views_handler_area_entity.inc:99
    [3] => entity_views_handler_area_entity->render() at /home5/respite2/live.respite/html/sites/all/modules/views/plugins/views_plugin_display.inc:2630
    [4] => views_plugin_display->render_area() at /home5/respite2/live.respite/html/sites/all/modules/views/theme/theme.inc:72
    [5] => template_preprocess_views_view() at /home5/respite2/live.respite/html/includes/theme.inc:1125
    [6] => theme() at /home5/respite2/live.respite/html/sites/all/modules/views/plugins/views_plugin_display.inc:2624
    [7] => views_plugin_display->render() at /home5/respite2/live.respite/html/sites/all/modules/views/includes/view.inc:1264
    [8] => view->render() at /home5/respite2/live.respite/html/sites/all/modules/views/plugins/views_plugin_display_page.inc:230
    [9] => views_plugin_display_page->execute() at /home5/respite2/live.respite/html/sites/all/modules/views/includes/view.inc:1345
    [10] => view->execute_display() at /home5/respite2/live.respite/html/sites/all/modules/views/views.module:540
    [11] => views_page()
    [12] => call_user_func_array() at /home5/respite2/live.respite/html/includes/menu.inc:527
    [13] => menu_execute_active_handler() at /home5/respite2/live.respite/html/index.php:21
)