Author Topic: Fatal error: Call to a member function numRows() on a non-object  (Read 409 times)

Offline svsanchez

  • Posts: 479
Fatal error: Call to a member function numRows() on a non-object
« on: December 10, 2018, 04:49:46 PM »
Hello everyone, my site www.quimiprova.com suddenly stopped working showing the following error:

Fatal error: Call to a member function numRows() on a non-object in /home/quimipro/public_html/framework/class.frontend.php on line 91

It shows the error no matter which page I try to access in the frontend. I can access the backend, but when I click on PAGES I get this error:

Fatal error: Call to a member function numRows() on a non-object in /home/quimipro/public_html/framework/class.database.php on line 151

Please help, I searched for a fix on the forum but couldn't find one. Thank you!

Offline dbs

  • Betatester
  • **
  • Posts: 8012
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Fatal error: Call to a member function numRows() on a non-object
« Reply #1 on: December 10, 2018, 05:02:44 PM »
Hi, what was your last change?
Which WB and PHP version?

Offline evaki

  • Posts: 2703
Re: Fatal error: Call to a member function numRows() on a non-object
« Reply #2 on: December 10, 2018, 06:10:51 PM »
Sieht so aus, als wär's v2.8.2.
Irgendwo zwischen den Leichen auf dem Server gibts auch noch'n _vti_bin/, was auf einen Microsoft Shared\Web Server hinweist.
Viel Spaß...
MfG. Evaki

Soeben (18'20) funktioniert sie wohl wieder
« Last Edit: December 10, 2018, 06:22:18 PM by evaki »

Offline jacobi22

  • Posts: 5865
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Fatal error: Call to a member function numRows() on a non-object
« Reply #3 on: December 10, 2018, 07:00:25 PM »
Quote
Fatal error: Call to a member function numRows()

means in every case: i get no results for the last (database-) request
the question is: WHY?

possible issues are:
- no items in this database
- no results for this special request
- fields in the request no avaiable in this database table

in this special case (class.frontend.php on line 91), the script search for the records in level = 0 in the pages-table and join it together with the results from the section table, and all this for the visibility = public, for a valide publishing date and for the actual language on this page, but something go'es wrong. if one of this point's is not correct, the result is empty and you get the numRows-Error

for example: if you set the page-language in WB-Settings to swedish and delete later the swedisch language without set a new page language and you have no records with language from the page settings in your database table "pages", you get the numRows-Error, because, the script search for a not avaiable language in the select

other example: you see the page overview with 10 pages and you delete now one of them directly in your database, you get the numRows-Error. Because, the overview read at first the page tree and know, this record was actual, but it doesn't found it

difficult to say, what's happend with your page, i didn't see any errors there, but it's a old version of WB  - i remember for a lot of problems with the addons-table, especially the languages, maybe you can check this first in your database. look here for the correct name and the correct language code on the installed and registered languages there and compare this language code with the records in the pages-table (UpperCase-Letters!)
example:
$language_code = 'PT';
$language_name = 'Portuguese (Brazil)

or
$language_code = 'ES';
$language_name = 'Spanish';
Wer nicht will, findet Gründe, wer will, findet Wege.

 

postern-length