Hi,

I have diferent content types of newsletter, but in one of these types don't show the statistics in the statistics page and in the "Newsletter Overview", "Newsletter clicks" and "Newsletter Summary" tabs I recibe an "Acces denied" error.
In the "Newsletter Opens" I don't recibe any error but the content don't display.
I check the views of statistics and don't return any data but the database tables content this data.

Anybody help me please.

Thanx in advance!

;)

Comments

Joel_XN created an issue.

Joel_XN’s picture

Any help?

dieuwe’s picture

Hey Joel_XN, I can't remember what problems this module has when using content types that aren't the "default" one, it might even be set up in such a way that it assumes you are using the default content type. It has been a few years since I worked on this module and I never used in the the scenario you are describing.

I am afraid that I don't have the time right now to try follow your steps to replicate. You'll either have to debug it yourself or find someone with some experience and spare time to help you provide a solution. Sorry.

extrarumeno’s picture

Hi

same error.... :(

jazzitup’s picture

The error appears when trying to render a view in views_embed_view from Views module:

views.module:

function views_embed_view($name, $display_id = 'default') {
  $args = func_get_args();
  // Remove $name.
  array_shift($args);
  if (count($args)) {
    // Remove $display_id.
    array_shift($args);
  }

  $view = views_get_view($name);
  if (!$view || !$view->access($display_id)) {
    return;
  }

  return $view->preview($display_id, $args);  
  /*** $view is a non empty object that returns NULL as $view->preview() ***/
}

Therefore, simplenews_statistics_embed_view() always return a NULL object from the simplenews_statistics.pages.inc:

function simplenews_statistics_embed_view($view_name, $display_id) {
  $view = views_embed_view($view_name);
  return render($view);
}
jazzitup’s picture

I played with it more and it seems like the main issue is with the definition of the arguments.

view.inc

// Arguments can, in fact, cause this whole thing to abort.
    if (!$this->_build_arguments()) {
      $this->build_time = microtime(TRUE) - $start;
      $this->attach_displays();
      return $this->built;
    }

View simplenews_statistics_overview returns FALSE at the very last line from above. Interesting comment in Views module, btw.

bertuuk’s picture

I arrive very late to this thread, but I had the same problem and I have solved it by adding the content type to the contextual filters (in the advanced tab) of the following views:
simplenews_statistics_overview
simplenews_statistics_clicks
simplenews_statistics_clicks_summary
simplenews_statistics_opens

I hope it helps you