snipt

Ctrl+h for KB shortcuts

Text only

Drupal: Panelizer, "Additional uncaught exception thrown while handling exception."

Just add max_allowed_packet = 20M to your my.ini (or my.cnf) file and try again
https://snipt.net/embed/a3a3103587dba1793932e03a77f373d2/
/raw/a3a3103587dba1793932e03a77f373d2/
a3a3103587dba1793932e03a77f373d2
text
Text only
1
2019-07-13T12:26:23
True
False
True
Jul 20, 2013 at 05:19 PM
/api/public/snipt/68807/
drupal-panelizer-additional-uncaught-exception-thrown-while-handling-exception
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Just add max_allowed_packet = 20M to your my.ini (or my.cnf) file and try again </span></pre></div> </td></tr></table>
"drupal 7", error, panelizer

Text only

Drupal: Failed to get available update data for X projects

Empty your cache_update table and try again
https://snipt.net/embed/abc9ee4b9318a3fdfe18f4f09dca309c/
/raw/abc9ee4b9318a3fdfe18f4f09dca309c/
abc9ee4b9318a3fdfe18f4f09dca309c
text
Text only
1
2019-04-09T04:10:43
True
False
True
Jul 20, 2013 at 02:06 PM
/api/public/snipt/68793/
drupal-failed-to-get-available-update-data-for-x-projects
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Empty your cache_update table and try again </span></pre></div> </td></tr></table>
"drupal 7", update

Text only

Drupal 7: View entity translation field duplicated issue

If you have a Sort Criteria on the title_field you may have your nodes appear twice.
To fix this, you just need to add a Filter Criteria on the title_field:language (Current user's language) and it works !
https://snipt.net/embed/8f519940f0965984452507bddd0000ff/
/raw/8f519940f0965984452507bddd0000ff/
8f519940f0965984452507bddd0000ff
text
Text only
2
2019-06-21T02:03:58
True
False
True
Jun 12, 2013 at 06:12 AM
/api/public/snipt/63929/
drupal-7-view-entity-translation-field-duplicated-issue
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>If you have a Sort Criteria on the title_field you may have your nodes appear twice. </span><span id="L-2"><a name="L-2"></a>To fix this, you just need to add a Filter Criteria on the title_field:language (Current user&#39;s language) and it works ! </span></pre></div> </td></tr></table>
"drupal 7", entity, field, i18n, translation, views

Text only

Drupal 7: Field redirection ajax issue (autocomplete input) - Entity Reference

1
2
3
If you have an error in your autocomplete inputs and if you have enabled the "Field redirection" module, you may take a look at your content type manage display screen.

If you're as dumb as I am you may have set the redirect field on the default display instead of the full content one. So when the autocomplete searches for the entity it is automatically redirected.
https://snipt.net/embed/a8b469681b2460a3852619eeee0c6341/
/raw/a8b469681b2460a3852619eeee0c6341/
a8b469681b2460a3852619eeee0c6341
text
Text only
3
2016-12-27T05:58:29
True
False
True
Mar 12, 2013 at 11:22 AM
/api/public/snipt/57485/
drupal-7-field-redirection-ajax-issue-autocomplete-input-entity-reference
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>If you have an error in your autocomplete inputs and if you have enabled the &quot;Field redirection&quot; module, you may take a look at your content type manage display screen. </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>If you&#39;re as dumb as I am you may have set the redirect field on the default display instead of the full content one. So when the autocomplete searches for the entity it is automatically redirected. </span></pre></div> </td></tr></table>
"drupal 7", "entity reference", "field redirection", ajax

PHP

Drupal 7: Import a custom block in a template

1
2
3
4
<?php
$block = module_invoke('block', 'block_view', '3'); // 3 is the block id
print render($block['content']);
?>
https://snipt.net/embed/d19ebe557a2369a6913bccf0fe52cbfa/
/raw/d19ebe557a2369a6913bccf0fe52cbfa/
d19ebe557a2369a6913bccf0fe52cbfa
php
PHP
4
2016-12-31T15:04:05
True
False
True
Feb 27, 2013 at 11:56 AM
/api/public/snipt/56607/
drupal-7-import-a-custom-block-in-a-template
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="nv">$block</span> <span class="o">=</span> <span class="nx">module_invoke</span><span class="p">(</span><span class="s1">&#39;block&#39;</span><span class="p">,</span> <span class="s1">&#39;block_view&#39;</span><span class="p">,</span> <span class="s1">&#39;3&#39;</span><span class="p">);</span> <span class="c1">// 3 is the block id</span> </span><span id="L-3"><a name="L-3"></a><span class="k">print</span> <span class="nx">render</span><span class="p">(</span><span class="nv">$block</span><span class="p">[</span><span class="s1">&#39;content&#39;</span><span class="p">]);</span> </span><span id="L-4"><a name="L-4"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
"drupal 7", block, template