By gabriel.ferreira on
I was adding a Block for the Header region of the site, suddently I received this mensage:
Fatal error: Call to undefined function: db_num_rows() in /includes/common.inc(1547) : eval()'d code on line 11
I can't redo the action, cannot acess admin site. Every page is the same error. Any sugestion
Comments
Just look up for blocks
Just look up for blocks table in your database and delete the block which you were trying to placed in header.
Work Hard to understand what you have to do b4 U start, You may not be able to develop every detail but the more U know the less risk you take.
suggestions
Suggestion 1 : Use descriptive forum topic titles
Suggestion 2 : Have a look at the Troubleshooting FAQ when you have trouble.
.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Compatibility problem
It sounds like you pasted Drupal 5 code into a Drupal 6 block - that function no longer exists in Drupal 6. You'll need to fix that in the DB (as per the first reply) by deleting the block.
The safer approach for coding blocks is to put them in a module. They are much easier to debug and reverse your changes than embedding the code in your database.
Some tips if you absolutely have to paste code into a block through the Drupal UI: tell Drupal not to show the block on the admin pages. That way you can still get back to the block management pages if the code has bugs in it. Also don't put code on a production site that you haven't tested yourself elsewhere first.
--
Anton