Render View or Block not Working in Drupal 7 So i have made a view and a block for a carousel. 
I want to call this view or block in my template. (panels-pane.tpl.php).

I have tried to call the view with this function : 

&lt;?php $view = views_embed_view('carousel', 'carousel-block_1'); print $view; ?&gt;


Unfortunately this is not working. Variable $view is NULL 

I also tried to call a block in this template file with this function : 

$block = module_invoke('views', 'block_view', 'carousel-block_1');
var_dump($block); // Empty ;s


Also not working..

The Delta ID is right. See Screenshot below for more information. 

Do i something wrong?



Full page code with other view render (also not working): 

&lt;?php
// @codingStandardsIgnoreFile

/**
 * @file panels-pane.tpl.php
 */

?&gt;

&lt;?php if ($pane_prefix): ?&gt;
  &lt;?php print $pane_prefix; ?&gt;
&lt;?php endif; ?&gt;
&lt;div
  class="&lt;?php print $classes; ?&gt;" &lt;?php print $id; ?&gt; &lt;?php print $attributes; ?&gt;&gt;
  &lt;?php if ($admin_links): ?&gt;
    &lt;?php print $admin_links; ?&gt;
  &lt;?php endif; ?&gt;

  &lt;div class="pane-content"&gt;
    &lt;?php $view = views_embed_view('downloads', 'downloads-product_downloads'); print $view;     var_dump($view); ?&gt;
    &lt;?php print render($title_prefix); ?&gt;
    &lt;?php if ($title): ?&gt;
    &lt;&lt;?php print $title_heading; ?&gt;&lt;?php print $title_attributes; ?&gt;&gt;
    &lt;?php print $title; ?&gt;
  &lt;/&lt;?php print $title_heading; ?&gt;&gt;
&lt;?php endif; ?&gt;
  &lt;?php print render($title_suffix); ?&gt;

  &lt;?php if ($feeds): ?&gt;
    &lt;div class="feed"&gt;
      &lt;?php print $feeds; ?&gt;
    &lt;/div&gt;
  &lt;?php endif; ?&gt;


  &lt;?php print render($content); ?&gt;
&lt;/div&gt;

&lt;?php if ($links): ?&gt;
  &lt;div class="links"&gt;
    &lt;?php print $links; ?&gt;
  &lt;/div&gt;
&lt;?php endif; ?&gt;

&lt;?php if ($more): ?&gt;
  &lt;div class="more-link"&gt;
    &lt;?php print $more; ?&gt;
  &lt;/div&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;
&lt;?php if ($pane_suffix): ?&gt;
  &lt;?php print $pane_suffix; ?&gt;
&lt;?php endif; ?&gt;
I hope views will never use hypens. May be you typed wrong.

Views always use underscores.

&lt;?php $view = views_embed_view('carousel', 'carousel-block_1'); print $view; ?&gt;


I think it should be 

&lt;?php $view = views_embed_view('carousel', 'carousel_block_1'); print $view; ?&gt;


As per your template.php

&lt;?php $view = views_embed_view('downloads', 'downloads_product_downloads'); print $view;     var_dump($view); ?&gt;