PDA

View Full Version : Data Manager error in vb 4.2.0


jamoss
09-03-2012, 05:03 PM
- I have a universal login: website->vbull
- Just upgraded to vb 4.2.0
- When I try to create a new user (new reg), I get this error when trying to initialize the data manager:
Fatal error: Please check the $bitfields array in the vB_DataManager_User class definition - $vbulletin->bf_misc_useroptions is not a valid bitfield.
in includes/class_dm.php on line 220

- BUT! When the exact same function is called to SAVE an existing user's record, it works.

I have used tools.php to fix the bitfields, I have run the upgrade script completely. Still happening. Any ideas?

ForceHSS
09-03-2012, 06:47 PM
have you edited that php file in any way in the also try replacing it with a fresh unedited one

jamoss
09-03-2012, 07:09 PM
No, didn't edit it. And I will upload..although I don't know why one function would call it and it would work, and the other would call it and it wouldn't work.

The function it's trying to call is:
datamanager_init('User', $vbulletin, ERRTYPE_CP);

ForceHSS
09-03-2012, 07:37 PM
hope this helps you work out the problem from line 187 to 220

* Constructor - checks that the registry object has been passed correctly.
*
* @param vB_Registry Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
* @param integer One of the ERRTYPE_x constants
*/
function vB_DataManager(&$registry, $errtype = ERRTYPE_STANDARD)
{
if (!is_subclass_of($this, 'vB_DataManager'))
{
trigger_error("Direct Instantiation of vB_DataManager class prohibited.", E_USER_ERROR);
}

if (is_object($registry))
{
$this->registry =& $registry;

if (is_object($registry->db))
{
$this->dbobject =& $registry->db;
}
else
{
trigger_error('Database object is not an object', E_USER_ERROR);
}
}
else
{
trigger_error('Registry object is not an object', E_USER_ERROR);
}

$this->set_error_handler($errtype);

if (is_array($this->bitfields))
{
foreach ($this->bitfields AS $key => $val)
{
if (isset($this->registry->$val))
{
$this->bitfields["$key"] =& $this->registry->$val;
}
else
{
trigger_error("Please check the <em>\$bitfields</em> array in the <strong>" . get_class($this) . "</strong> class definition - <em>\$vbulletin->$val</em> is not a valid bitfield.<br />", E_USER_ERROR);

jamoss
09-03-2012, 08:06 PM
Thanks! It looks like it does have to do with bitfields that are either set or not set, triggering this error.

I got away with commenting out line #224 in class_dm.php and it works. That's a kluge, but at least it will let me move forward and complete registrations until I figure out a real fix.

ForceHSS
09-03-2012, 08:59 PM
happy to help