I started using the Beta today, and after I hit the "SAVE" button: I got this error on a blank page:

Fatal error: Call to undefined function: execute_hook_menu() in /home/toaleta/public_html/or2anul/modules/views/includes/view.inc on line 730

Then, while refreshing the first page I got:


    * If you install the advanced help module from http://drupal.org/project/advanced_help, Views will provide more and better help. Hide this message.
    * The view has been saved.

: Invalid argument supplied for foreach() in /home/toaleta/public_html/or2anul/modules/views/views.module on line 843.
Page not found
The requested page could not be found

Now, every page is giving the "Page not found" error.
Can someone help?

Comments

merlinofchaos’s picture

What version of PHP are you using?

merlinofchaos’s picture

Ok, you're experiencing a bug that just should not happen. Can you do me a favor and put in some debugging code at line 843 in views.module?

  if (!is_array($view->display)) { drupal_set_message(print_r($view->display, 1)); }

That should put up a debug message showing what the looping there is trying to crash on.

meruthecat’s picture

Help!!! I think something similar has happened to me. I uploaded views and selected to install Views as well as Multilingual Views (i18n module). I started getting Page Not Found Errors on ever page so i tried deleting Views from my directory and going to update.php. Update.php was blank, so I tried transferring Views again and going to update.php again. I get the following error:

warning: require_once(./modules/views/includes/admin.inc) [function.require-once]: failed to open stream: No such file or directory in /home/.urena/ccd/ifccd.com/modules/views/views_ui.module on line 171.

I do show both of these files in the directory.

I'm not a coder so this was all I could think of doing to fix the problem. Any help out there?!

merlinofchaos’s picture

meruthecat: Your issue is separate, you really should create a new issue for that.

If the file is there and your system cannot find it, I have very little advice for you except that there must be some kind of misconfiguration. Make absolutely sure the file in question is in views/includes/ and not just in 'views', as some unzip tools flatten directories unless you tell them not to.

As an aside, you really should put modules in 'sites/all/modules' rather than 'modules' so that you can easily separate your contributed modules from your core modules.

Worst case scenario: you can go into SQL and
DELETE from SYSTEM where name like 'views%';

That will forcibly remove the modules.

meruthecat’s picture

Thanks for the help and apologies for my lack of protocol and understanding. I'm not sure whether to open a separate issue now that I've started this thread.

You're right that the folder includes was missing so I added it and copied admin.inc into that folder. That lead to this error:

* warning: include_once(modules/views//includes/tabs.inc) [function.include-once]: failed to open stream: No such file or directory in /home/.urena/ccd/ifccd.com/includes/theme.inc on line 283.
* warning: include_once() [function.include]: Failed opening 'modules/views//includes/tabs.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.urena/ccd/ifccd.com/includes/theme.inc on line 283.
* warning: include_once(modules/views//includes/tabs.inc) [function.include-once]: failed to open stream: No such file or directory in /home/.urena/ccd/ifccd.com/includes/theme.inc on line 283.
* warning: include_once() [function.include]: Failed opening 'modules/views//includes/tabs.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.urena/ccd/ifccd.com/includes/theme.inc on line 283.
* warning: require_once(./modules/views/theme/theme.inc) [function.require-once]: failed to open stream: No such file or directory in /home/.urena/ccd/ifccd.com/modules/views/views.module on line 17.

I do not have my modules inside 'sites/all/modules'. Once I fix this bug, how can I safely migrate modules there without breaking anything?

I can try going into SQL to delete views but prefer not to if there is something else I can try first since I have almost zero SQL experience. But there is a first time for everything.

meruthecat’s picture

Ok, so I'm an idiot. The problem was entirely due to the flattening issue you mention above. I unzipped the files again, transferred the module, ran update.php and now what was broken is now fixed. Lovely, thank you. Any advice on now migrating my modules to the proper folder without doing any serious damage to myself or others?

merlinofchaos’s picture

See http://drupal.org/node/251273 for more on this thread.

rats’s picture

PHP version 4.3.11

Nothing is new after I put that line in views.module, and I did put it in front and after

  foreach ($view->display as $display) { 

edit: I am currently on #drupal-support chan, if you wish to solve this directly.

merlinofchaos’s picture

I *think* I've fixed this. Or at least something like it. After playing with this for awhile I did find a bug that was causing similar circumstances, though not exactly the same. A fix is checked into CVS.

merlinofchaos’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.