I'm trying to theme a paragraph module on a specific page. The bundle-view suggestions wont seem to help here, so I am trying to create a custom hook suggestion to push my template. I tried both of these methods in my mytheme.theme file ;

function mytheme_theme_suggestions_paragraph_alter(&$suggestions, $variables) {
function mytheme_preprocess_paragraph(&$variables) {

After refreshing cache, I get these errors :

I've successfully done this on other modules in the same file, but for some reason it breaks here. Any ideas what I'm doing wrong and how to correctly do this ?

EDIT: I've increased the max_allowed_packet in MySQL my.ini from 1M to 256M and I now get " an unexpected error..." message and no errors in the drupal log. I do however get these errors from apache :



It looks like you're MySQL server is getting overloaded and going down, too much kint() debugs runned at once maybe? It doesn't look like issue with module itself.

  • I suspected it might be related to the kint. So I added a kint($vars) back into another working suggestion alter function and it works fine. When testing the page. 'an unexpected error..." pops up instantly, so it doesn't appear to be reaching a timeout limit. – AyexeM Sep 21 '17 at 19:24
  • kint is way heavy. Consider setting up xdebug. – Kevin Sep 21 '17 at 19:28
  • According to your last update, I still think you've got problems with mysql configuration, as you can see, you're getting following errors: "Syntax error or access violation: 1118 The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size." And it's happening during regular queries like adding now row to watchdog table, try to tweak your innodb_log_file_size , maybe this will help stackoverflow.com/a/27359753/3406995 – drupalranger Sep 22 '17 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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