Fatal error after disabing the module.

Fatal error: Call to undefined function bpv_is_visible() in /virtual/****/public_html/includes/common.inc(1347) : eval()'d code on line 1

Same after deleting the module.

Comments

moshe weitzman’s picture

Title: Fatal error after disabing the module » add hook_uninstall
moshe weitzman’s picture

Category: bug » feature
ryo’s picture

I would be very happy if you could tell me a way to recover the site, if there's.

Thanks in advance.

jonne.freebase’s picture

Category: feature » bug

I've had the same thing happen to me (disabled bpv, now no part of the site loads). It would be nice to know which code exctly it's eval()ing.

edit: I found a solution. You just need to delete some records from the database (use phpmyadmin or similar for this, and don't forget to back up your db first)

In the table 'blocks', there's an entry where the value of pages is something like return bpv_is_visible('user_1'); . Just delete those.

You could also just run DELETE FROM `blocks` WHERE `pages` LIKE '%bpv_is_visible(%', if you're comfortable running untested SQL queries from random strangers.

moshe weitzman’s picture

Title: add hook_uninstall » add hook_disable
maui1’s picture

Thanks, I was a little amazed at the fatal error, and just a little nervous when it didn't go away after deleting the bpv module. I knew there must be some code in the DB, but for those who might also have this problem, you should only delete the php snippet in the pages field and not the complete entry in the block table. This will retain your current block layout, and you will only have to go in to each block config if you have set any visibility parameters.

omnyx’s picture

is this still a problem?
also is this module usable for production sites?

thanks!

TC44’s picture

Same problem here, and got errors after installing, so I was trying to remove it.
Fatal error: Call to undefined function bpv_is_visible()

The previous suggestion to remove references from the db worked for me.

asb’s picture

Hi,

the SQL statement works fine for me:

mysql> DELETE FROM `blocks` WHERE `pages` LIKE '%bpv_is_visible(%';
Query OK, 32 rows affected (0.03 sec)

But uninstalling the Block Page Visibility module had another unwanted side effect on my site: It disabled *all* blocks, and erasedsome of the visibility configurations from the blocks - those took me days to figure out.

THIS MODULE IS HARMFUL TO THE AVERAGE DRUPAL ADMINISTRATOR!

RUN A BACKUP BEFORE INSTALLIUNG AND/OR UNINSTALLING IT!

The module has no user interface, can't be uninstalled cleanly and won't be of any use IF YOU DON'T PLAN TO DEVELOP CODE FOR YOURSELF which uses the hooks the Block Page Visibility module provides.

Regards, -asb

moshe weitzman’s picture

Status: Active » Closed (duplicate)