fatal error when submitting registration form

16 years 9 months ago #41801 by Blasphemy
Whenever I try to create a new user and submit the registration form, it takes me to an error page:

Warning: saveregistration(D:/hshome/cleanmyw/netguidedog.com/administrator/components/com_virtuemart_search/lib.virtuemart_search.php): failed to open stream: No such file or directory in D:\hshome\cleanmyw\netguidedog.com\components\com_comprofiler\comprofiler.php on line 1327

Fatal error: saveregistration(): Failed opening required 'D:/hshome/cleanmyw/netguidedog.com/administrator/components/com_virtuemart_search/lib.virtuemart_search.php' (include_path='.;c:\php4\pear') in D:\hshome\cleanmyw\netguidedog.com\components\com_comprofiler\comprofiler.php on line 1327

The account is created, but it's just not good practice to have a big error page splashed across the screen! I had a virtuemart plugin in there that caused the virtuemart registration fields to be appended to the bottom of the new user registration form. I have unpublished that plugin at the moment. Anyone know what I can do to fix this?

Thank you,
David Henderson

Please Log in to join the conversation.

16 years 9 months ago #41850 by Blasphemy
Replied by Blasphemy on topic Re:fatal error when submitting registration form
Ok, I did a bit more digging, and I found where in the code the line from the error is. Here is the area causing the error:

[code:1] ###############
#added by Synchronize_CB_Users component
###############
global $mosConfig_absolute_path;
require_once( $mosConfig_absolute_path . '/administrator/components/com_virtuemart_search/lib.virtuemart_search.php' );

$query = "SELECT * from #__comprofiler WHERE user_id = ".$row->id;
$database->setQuery( $query );
$snc_cb_users_sync = $database->loadObjectList();

$query = "SHOW COLUMNS FROM #__comprofiler";
$database->setQuery( $query );
$snc_cb_struct_sync = $database->loadObjectList();

$query = "SELECT * from #__comprofiler_tabs";// WHERE title not like '_UE_%' and tabid > 22";
// try to USE OTHER CONDITIONS !!!!!!!!!! in 'where' section
$database->setQuery( $query );
$snc_cb_tabs_sync = $database->loadObjectList();

$query = "SELECT cf.* FROM #__comprofiler_fields cf WHERE cf.name <> 'NA' and cf.type <> 'predefined' ORDER BY cf.fieldid";
$database->setQuery( $query );
$snc_cb_tbl_fields_sync = $database->loadObjectList();

$query = "SELECT cfv.* FROM #__comprofiler_field_values cfv ORDER BY cfv.fieldid, cfv.fieldvalueid";
$database->setQuery( $query );
$snc_cb_tbl_fieldvalues_sync = $database->loadObjectList();

$snc_query = "SELECT * from #__sync_cb_users_params WHERE published = 1";
$database->setQuery( $snc_query );
$snc_params = $database->loadObjectList();
$snc_old_group_id = $acl->get_group_id( 'Registered', 'ARO' );
$query2 = "SELECT name from #__core_acl_aro_groups WHERE group_id = '".$snc_old_group_id."'";
$database->setQuery( $query2 );
$snc_group_name = $database->LoadResult();
foreach( $snc_params as $snc_param) {
$snc_connecthost = stripslashes($snc_param->sync_host);
$snc_connectuser = $snc_param->sync_user;
$snc_connecttable = $snc_param->sync_table;
$snc_connect_cb_table = $snc_param->sync_cbtable;
$snc_connectpass = base64_decode(stripslashes($snc_param->sync_pass));
$snc_connectdb = $snc_param->sync_db;
$database->database( $snc_connecthost, $snc_connectuser, $snc_connectpass, $snc_connectdb, '', false);
if ($database->_resource) {
if ($snc_connecttable == ""«») { $snc_table_name = SNC_GetUsersTable($snc_connectdb); }
else { $snc_table_name = $snc_connecttable; }
if ($snc_connect_cb_table == ""«») { $snc_cb_table_name = SNC_GetCBTable($snc_connectdb); }
else { $snc_cb_table_name = $snc_connect_cb_table; }
if (($snc_table_name != ""«») && ($snc_cb_table_name != ""«»)) { //if both tables exists
$query2 = "SELECT count(*) from ".$snc_table_name." WHERE username = '".$row->username."' OR email = '".$row->email."'";
$database->setQuery( $query2 );
$snc_count = $database->loadResult();
if ($snc_count == 0) {
$query2 = "SELECT group_id from ".SNC_GetPrefixByUsersTable($snc_table_name)."core_acl_aro_groups WHERE name = '".$snc_group_name."'";
$database->setQuery( $query2 );
$snc_new_gid = $database->LoadResult();
$query2 = "INSERT INTO ".$snc_table_name." (name, username, email, password, usertype, block, sendEmail, gid, registerDate, lastvisitDate, activation, params)"
." VALUES('".$row->name."', '".$row->username."', '".$row->email."', '".$snc_pass."', '".$snc_group_name."',"
." '".$row->block."', '".$row->sendEmail."', '".$snc_new_gid."', '".$row->registerDate."', '".$row->lastvisitDate."', '".$row->activation."', '".$row->params."')";
$database->setQuery( $query2 );
if ($database->query()) {
$query2 = "SELECT id from ".$snc_table_name." WHERE name = '".$row->name."' and username = '".$row->username."' and email = '".$row->email."' and password = '".$snc_pass."'";
$database->setQuery( $query2 );
$snc_new_userid = $database->LoadResult();
if ($snc_new_userid) {
//sync comprofiler user data
$i = -1;
foreach ($snc_cb_users_sync as $snc_cb_user_row) {
$i++;
if ($snc_cb_user_row->user_id == $row->id) { //user to synchronize
$snc_cb_user_row->user_id = $snc_new_userid;
$snc_cb_user_row->id = $snc_new_userid;
#unset($snc_cb_user_row->avatar);
//NO AVATAR support
#unset($snc_cb_user_row->avatarapproved);
if (!$database->insertObject($snc_cb_table_name, $snc_cb_user_row)) { //!!!!structure of tables must be identical !!!!!!!!
//$synchronize_log .= " (Error during added user to CB«»)";
echo $database->getErrorMsg()."<br>";
}
//else { $synchronize_log .= " (User added to CB«»)";}
#$snc_cb_user_row->user_id = -100; //TEST THIS !!!!!!!!!!!!!!!!!!
#$snc_cb_users_sync[$i]->user_id = -100;
#$snc_cb_users_sync[$i]->id = -100;
}
}
$query2 = "INSERT INTO ".SNC_GetPrefixByUsersTable($snc_table_name)."core_acl_aro ( section_value, value, order_value, name, hidden)"
." VALUES ('users', '".$snc_new_userid."', '0', '".$row->name."', '0')";
$database->setQuery( $query2 );
if ($database->query()) {
$query2 = "SELECT aro_id from ".SNC_GetPrefixByUsersTable($snc_table_name)."core_acl_aro WHERE value = '".$snc_new_userid."' and name = '".$row->name."'";
$database->setQuery( $query2 );
$snc_new_aroid = $database->LoadResult();
if ($snc_new_aroid) {
$query = "INSERT INTO ".SNC_GetPrefixByUsersTable($snc_table_name)."core_acl_groups_aro_map (group_id, aro_id)"
." VALUES('".$snc_new_gid."', '".$snc_new_aroid."')";
$database->setQuery( $query );
$database->query();
}
}
}
}
}
}
}
}
if (count($snc_params) > 0) {
global $mosConfig_host;
global $mosConfig_user;
global $mosConfig_password;
global $mosConfig_db;
global $mosConfig_dbprefix;
$database->database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
}
###############
# end of SynchronizeUsers
###############[/code:1]

Now, it would seem that the problem is arising because there is no lib.virtuemart_search.php file for it to find on my server. Heck, there isn't even a com_virtuemart_search folder in the administrator/components folder on my server. So my question is, how can I fix this? Do I need to correct where it is looking because the code is needed to properly synchronize users, or can I just remove that area to fix it without causing the synchronize users function to break? Any help on this matter would be greatly appreciated!

Thank you,
David Henderson

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.172 seconds

Facebook Twitter LinkedIn