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

sportel’s picture

Am I the only one with these notices?

sportel’s picture

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

candelas’s picture

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 :)

sportel’s picture

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.

candelas’s picture

@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 :)

rockaholiciam’s picture

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;
      }
    }
killua99’s picture

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

create a patch with git

jelhan’s picture

Issue summary: View changes

I just created a complex PDF view with latest Views PDF dev version (2014-Aug-07), TCPDF 6.0.090 and FPDI 1.5.2 running on 5.4.4 and didn't got any notice or strict warning yet. This combination seems to work fine together.

killua99’s picture

ok fine, please a little bit more and then put it on RTBC to fix this issue :)

vegansupreme’s picture

Status: Active » Closed (fixed)

I haven't seen this error lately. If anyone is still getting this error please reopen this issue and I'll investigate further.