0

After putting my website (in drupal 7) online today, I got a few strange errors from the 'View' module. On my local machine everything is working fine, but online I just keep getting those errors! I already checked the php version, php limit, hosting space, .. etc, everything is fine. I tried deleting all my views and adding new ones aswell, but this doesn't work either; when I try to save, nothing happens. These are the errors I'm talking about:

Notice: Undefined index: fields in views_db_object->init() (line 2175 of /home/kvclinke/public_html/sites/all/modules/contrib/views/includes/view.inc).
Warning: Invalid argument supplied for foreach() in views_db_object->init() (line 2175 of /home/kvclinke/public_html/sites/all/modules/contrib/views/includes/view.inc).
Notice: Undefined index: fields in views_db_object->init() (line 2175 of /home/kvclinke/public_html/sites/all/modules/contrib/views/includes/view.inc).
Warning: Invalid argument supplied for foreach() in views_db_object->init() (line 2175 of /home/kvclinke/public_html/sites/all/modules/contrib/views/includes/view.inc).
Notice: Undefined index: fields in views_db_object->init() (line 2175 of /home/kvclinke/public_html/sites/all/modules/contrib/views/includes/view.inc).
Warning: Invalid argument supplied for foreach() in views_db_object->init() (line 2175 of /home/kvclinke/public_html/sites/all/modules/contrib/views/includes/view.inc).

After checking my serverlogs, I also found this:

[Thu Oct 10 13:08:17 2013] [error] [client 213.224.29.86] ] [notice] EACCELERATOR(12762): PHP crashed on opline 3689348415265695042 of form_execute_handlers() at /home/kvclinke/public_html/includes/form.inc:1465, referer: http://www.kvclinkeroever.be/admin/structure/views/view/test

Anyone knows a fix for this or what the cause of this problem is? Thanks in advance!

0

Update: Disable eAccelerator on your server. It is caching the views module code and somehow that deletes the table name property of the views_object which causes this error. No idea how to fix it other than not using eAccelerator.

I am afraid I have no answer, but also have the same problem on one of my clients servers. It seems to me server configuration related, since I have installed the Views module successfully on my test server, but on the client's server even installing the Views module on a fresh Minimal install of Drupal creates the same error messages. I have been comparing server settings between the test and client servers, but so far found nothing significant.

If I am reading the code correctly, the problem is most likely due to a problem retrieving a schema object - the retrieved object is not a schema object (thus has no 'fields' property) but at the same time is not an empty object, as this would terminate the function early before generating this error.

Have you gotten any further with this?

  • I have found the culprit - eAccelerator. Turn that off and you are good to go. Made a note of it at the views module project issue log, but don't know if anyone will pay any attention to it or get around to investigating the possible conflict. – Jose Uribe Oct 15 '13 at 13:14
  • Sorry for my extremely late response haha! Yes, that indeed was the problem. I contacted my webhosting and they turned it off, after that it worked perfectly. So thanks for your answer! ;-) – M. Winterinho Jan 29 '14 at 10:49
0

Are you sure all the modules are same in your local environment and live site?..There might be cases, if one of such module is missing, views will show missing handlers and will through these kinds of errors. Please try and see if some required module is missing.

This seems a database migration issue. Did your database migration go smooth?..It is strongly suggested you use Backup & Migrate module to deploy database to produciton. You can try to migrate your database through the module once. In the past this had helped me in fixing similar issues.

  • Yes, all the modules are the same, I upload the modules folder from my local site to the server so.. I also just double checked, the same modules are enabled/disabled.. I tried a new 'Views' install by downloading & uploading it again but still no luck. – M. Winterinho Oct 10 '13 at 11:33
  • This is for sure something related to the database. Please check my updated answer. – Neo Oct 10 '13 at 12:10
  • I don't see your updated answer anywhere? It's still the same or am I looking wrong? – M. Winterinho Oct 10 '13 at 12:17
  • hey sorry, i updated the comment and then internet went off before i could update the answer. Have a look now. – Neo Oct 10 '13 at 12:29
  • No problem! Actually yes, it did go smooth, I already tried it via Backup & Migrate, and also manually, everytime I do this, I can 't even get on my website anymore and I get this error: Fatal error: Call to undefined method stdClass::init_display() in /home/kvclinke/public_html/sites/all/modules/contrib/views/views.module on line 611 So untill I turn of Views & Views UI via database, I can 't even get on my website anymore.. – M. Winterinho Oct 10 '13 at 12:45

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.