Follow-up from #2042927: notices in style unformatted.

Notice: Undefined variable: pdf_display in views_view_field_handler_include_view->render() (regel 158 van /mydomain/sites/all/modules/views_pdf/modules/views_view_field/views_view_field_handler_include_view.inc).
Notice: Undefined offset: 0 in views_pdf_plugin_style_unformatted->render_grouping_sets() (regel 48 van /mydomain/sites/all/modules/views_pdf/views_pdf_plugin_style_unformatted.inc).
Notice: Undefined variable: pdf_display in views_view_field_handler_include_view->render() (regel 158 van /mydomain/sites/all/modules/views_pdf/modules/views_view_field/views_view_field_handler_include_view.inc).
Notice: Undefined variable: pdf_display in views_view_field_handler_include_view->render() (regel 158 van /mydomain/sites/all/modules/views_pdf/modules/views_view_field/views_view_field_handler_include_view.inc).

Comments

Am I the only one with these notices?

Can I hide these error messages for all users except for the admin until this issue has been solved?

hello

you can go to and say not to show
admin/config/development/logging
and as admin, you can check in
admin/reports/dblog

for what i have seen, you cant have grouping sets in views_pdf. you can search for issues about it and the rest.
i hope it helped :)

Thanks for the hint candelas,

Everything seems to be working, except for all the errors of course. I'll wait until there is a solution (I'm not capable of solving it at code level I'm afraid). At least I won't have to bother users with the messages anymore.

The comment you made on grouping sets is discussed in #2042927: notices in style unformatted I believe. I'm keeping an eye on that to. For the other error messages, I haven't found anyone else with the same problem. Curious.

Mike.

@sportel: i advice to you to spend a bit of time and detect which options you have selected in the view that causes those warnings. like that you make possible to debug. its easy for you, duplicate the view, and play with it. do you have included views? because you have a tip in the error ...
views_view_field_handler_include_view
good luck :)

You can go to the line it throws the error at and just before it, change this block of code:

    // look for a display named pdf_X.
    foreach($view->display as $display) {
      if (preg_match('/^pdf_/', $display->id)) {
        // found a PDF display so break out of loop.
        $pdf_display = $display->id;
        break;
      }
    }

to:

    // Set $pdf_display to default to avoid a notice
    $pdf_display = 'default';
    // look for a display named pdf_X.
    foreach($view->display as $display) {
      if (preg_match('/^pdf_/', $display->id)) {
        // found a PDF display so break out of loop.
        $pdf_display = $display->id;
        break;
      }
    }

Rockaholiciam, could you please make a patch file for it? it's easy to create patch files.

create a patch with git