Hi,

After I clear all caches or even theme-registry only WITH DRUSH, when I reload the page I get a bunch of errors, here are the main keywords:

Warning : array_diff(): Argument #1 is not an array omega_theme_registry_alter() 

Warning : array_unshift() expects parameter 1 to be array, null given omega_theme_registry_alter()

Notice : Undefined index: hero_layout omega_theme_registry_alter() 

Notice : Undefined index: simple_layout omega_theme_registry_alter()

Notice : Undefined index: off_canvas_layout omega_theme_registry_alter() 

Notice : Undefined index: divine_layout omega_theme_registry_alter()

If I clear all caches or even theme-registry only with admin menu GUI link, I don't have any error.

Any idea what could cause this?

Comments

PCateNumbersUSA’s picture

I'm getting this error as well, it's quite annoying

thalemn’s picture

Version: 7.x-4.3 » 7.x-4.4

I'm getting this error, too. Info from drush posted below.

$ drush rr
The registry has been rebuilt via registry_rebuild (A).                                                                                                [success]
The registry has been rebuilt via registry_rebuild (A2).                                                                                               [success]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
 All caches have been cleared with drush_registry_rebuild_cc_all.                                                                                       [success]
The registry has been rebuilt via drush_registry_rebuild_cc_all (B).                                                                                   [success]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
array_diff(): Argument #1 is not an array template.php:470                                                                                             [warning]
array_unshift() expects parameter 1 to be array, null given template.php:472                                                                           [warning]
All caches have been cleared with drush_registry_rebuild_cc_all.                                                                                       [success]
All registry rebuilds have been completed.                                

Here is the template.php code that is referenced:

// Add a preprocessor for initializing default variables to every layout.
  foreach (array_keys(_omega_theme_layouts()) as $hook) {
    $registry[$hook]['preprocess functions'] = array_diff($registry[$hook]['preprocess functions'], array('template_preprocess'));

    array_unshift($registry[$hook]['process functions'], '_omega_preprocess_default_layout_variables');
  }
thalemn’s picture

Does anyone have a moment to take a look at this? Much appreciated!
For what it's worth, I commented out the following code in the template.php file. I also disabled the core Omega 4.4 theme and only have the custom theme enabled. Seems to be working well.

 foreach (array_keys(_omega_theme_layouts()) as $hook) {
    $registry[$hook]['preprocess functions'] = array_diff($registry[$hook]['preprocess functions'], array('template_preprocess'));

    array_unshift($registry[$hook]['process functions'], '_omega_preprocess_default_layout_variables');
  }
steinmb’s picture

Version: 7.x-4.4 » 7.x-4.x-dev

Hi
It would be easier to other to test it If you turn your changes into a real patch (https://www.drupal.org/patch). Make sure the patch apply to dev. since that is where the changes will be committed.