The alter_xx hooks introduced in current CVS version actually break the views module in the 4.7 branch.

For example

    $table_data = module_invoke_all('views_tables');
    // allow modules to alter the definitions supplied others
    $table_data = module_invoke_all('views_tables_alter', $table_data);

leads to $table_data being empty after the call to 'views_tables_alter' hook. Same holds for arguments.

In the end, no default view is working and the views admin screens are a mess :-(

I'm not sure what is intended, but either you pass $table_data by reference to the hook functions, than code looks like this:

    $table_data = module_invoke_all('views_tables');
    // allow modules to alter the definitions supplied others
    module_invoke_all('views_tables_alter', $table_data);

Or you merge the results:

    $table_data = module_invoke_all('views_tables');
    // allow modules to alter the definitions supplied others
    $table_data = array_merge($table_data, module_invoke_all('views_tables_alter', $table_data));

But I can't imagine how the current code can possibly work.

Comments

merlinofchaos’s picture

You're absolutely correct. Le sigh. Should've known better than to commit this patch. Will fix before a release goes out.

drewish’s picture

i'm having the same problem with HEAD...

merlinofchaos’s picture

Status: Active » Fixed

Patch reverted in both HEAD and 4.7 branches.

drewish’s picture

merlin, thanks for such a quick response.

gerd riesselmann’s picture

Status: Fixed » Closed (fixed)

Thanks from me, too.