I'm getting this error when I embed a view on a page. It doesn't happen when I preview the view in views UI.

"recoverable fatal error: Object of class stdClass could not be converted to string in views\includes\view.inc on line 728."

This is my embed code:

<?php print views_embed_view('list_applications_for_reviewer', 'block_1', array(85, 229)); ?>

I don't have this problem in any of the other views on my site, of which there are many doing similar things.

Any ideas what I might need to fix?

1 Answer 1


First thing I would try is using instead of passing the arguments as an array. I recall hitting this issue because views_embed_view() uses func_get_args() to process view arguments and behaves oddly if an array of them is passed.

If that doesn't work, your best bet is to step through the code with Xdebug and see if you can find the difference between that variable when it works (all other times) and when it doesn't (this time).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.