Hello,
After upgrading to 4.0.1 when trying to rebuild relationships, the script terminates on the screen with the following error in the log:
Metadata for table users does not exist
Cheers,
--Bill
Hello,
After upgrading to 4.0.1 when trying to rebuild relationships, the script terminates on the screen with the following error in the log:
Metadata for table users does not exist
Cheers,
--Bill
Last edited by tourist; 2006-01-25 at 07:45 PM. Reason: error in version in subject
not sure if my error is related, but when i try to rebuild relationships I'm getting the following error (post upgrade to 4.0.1 - actually my upgrade failed with the "invalid entry point" error, I wound up doing a clean install of 4.0.1)
"Fatal error: main(): Failed opening required '' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/sugarcrm/modules/Administration/RebuildRelationship.php on line 34"
Last edited by jilliand; 2006-01-25 at 09:34 PM. Reason: adding information about my installation - new install, not upgrade
Application administrators can rebuild relationships using the RebuildRelationships option from the Administration Panel.
Can you provide some information about the version you were upgrading from?
Thanks,
-Ajay
I have upgraded from version 4.0 to 4.0.1. I have used the "Rebuild Relationships" option in the admin, because I was shown a warning "Please go to the Repair screen and click on Rebuild Relationships."
After the "Rebuild Relationship" is clicked, the screen dumps the following:
Processing relationship meta for relationships...done
Processing relationship meta for acl_roles...done
Processing relationship meta for acl_actions...done
Processing relationship meta for leads...done
Processing relationship meta for contacts...done
Processing relationship meta for accounts...done
Processing relationship meta for opportunities...done
Processing relationship meta for cases...done
Processing relationship meta for notes...done
Processing relationship meta for email_templates...done
Processing relationship meta for emailman...done
Processing relationship meta for calls...done
Processing relationship meta for emails...done
Processing relationship meta for meetings...done
Processing relationship meta for iframes...done
Processing relationship meta for tasks...done
Processing relationship meta for users...done
Processing relationship meta for users...done
Processing relationship meta for currencies...done
Processing relationship meta for tracker...done
Processing relationship meta for import_maps...done
Processing relationship meta for files...done
Processing relationship meta for users_last_import...done
Processing relationship meta for config...done
Processing relationship meta for upgrade_history...done
Processing relationship meta for vcals...done
Processing relationship meta for bugs...done
Processing relationship meta for versions...done
Processing relationship meta for releases...done
Processing relationship meta for feeds...done
Processing relationship meta for project...done
Processing relationship meta for project_task...done
Processing relationship meta for roles...done
Processing relationship meta for email_marketing...done
Processing relationship meta for campaigns...done
Processing relationship meta for prospect_lists...done
Processing relationship meta for prospects...done
Processing relationship meta for documents...done
Processing relationship meta for document_revisions...done
Processing relationship meta for fields_meta_data...done
Processing relationship meta for schedulers...done
Processing relationship meta for schedulers_times...done
Processing relationship meta for inbound_email...done
Processing relationship meta for users...done
Processing relationship meta for campaign_log...done
Processing relationship meta for dashboards...done
And then nothing.. At the same time the sugarcrm.log shows the following entry:
"Metadata for table users does not exist"
I am running on Linux with Mysql database.
Let me know if you need additional info.
Cheers,
--Bill
I assume that the rebuilding of the relationship failed because I am still shown the warning to go to the Repair screen and rebuild relationships.
--Bill
Originally Posted by agupta
What version did you upgrade from?
Kenneth Brill - Help Forum Moderator
I do not respond to 'Private Messages'. Please email me directly instead
When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
Help us Help You
Bill,
You will need to do some code changes in order to debug the problem further. Please make following modifications to RebuildRelationship.php
Replace this section of code:
foreach( $beanFiles as $bean => $file ){
if (!class_exists($bean)) {
require($file);
}
$focus = new $bean();
$table_name = $focus->table_name;
$empty='';
echo "Processing relationship meta for ". $focus->table_name."...";
SugarBean::createRelationshipMeta($focus->getObjectName(),$db,$table_name,$empty,$focus->module_dir);
echo 'done<br>';
}
With this (adding a debug message) :
foreach( $beanFiles as $bean => $file ){
print_r("bean=". $bean." file n ame=".$file."<BR>");
if (!class_exists($bean)) {
require($file);
}
$focus = new $bean();
$table_name = $focus->table_name;
$empty='';
echo "Processing relationship meta for ". $focus->table_name."...";
SugarBean::createRelationshipMeta($focus->getObjectName(),$db,$table_name,$empty,$focus->module_dir);
echo 'done<br>';
}
and run Rebuld Relatinships again. you will see the bean name and the corresponding file name as it is being processed. After a failure compare the contents of the failed file with one that ran successfully.
Thanks,
Ajay
From the "Repair" page, when I hit "Rebuild Relationships", I get the following message:
Processing relationship meta for relationships...done
Processing relationship meta for acl_roles...done
Processing relationship meta for acl_actions...done
Processing relationship meta for leads...done
Processing relationship meta for contacts...done
Processing relationship meta for accounts...done
Processing relationship meta for opportunities...done
Processing relationship meta for cases...done
Processing relationship meta for notes...done
Processing relationship meta for email_templates...done
Processing relationship meta for emailman...done
Processing relationship meta for calls...done
Processing relationship meta for emails...done
Processing relationship meta for meetings...done
Processing relationship meta for iframes...done
Processing relationship meta for tasks...done
Processing relationship meta for users...done
Processing relationship meta for users...done
Processing relationship meta for currencies...done
Processing relationship meta for tracker...done
Processing relationship meta for import_maps...done
Processing relationship meta for files...done
Processing relationship meta for users_last_import...done
Processing relationship meta for config...done
Processing relationship meta for upgrade_history...done
Processing relationship meta for vcals...done
Processing relationship meta for bugs...done
Processing relationship meta for versions...done
Processing relationship meta for releases...done
Processing relationship meta for feeds...done
Processing relationship meta for project...done
Processing relationship meta for project_task...done
Processing relationship meta for roles...done
Processing relationship meta for email_marketing...done
Processing relationship meta for campaigns...done
Processing relationship meta for prospect_lists...done
Processing relationship meta for prospects...done
Processing relationship meta for documents...done
Processing relationship meta for document_revisions...done
Processing relationship meta for fields_meta_data...done
Processing relationship meta for schedulers...done
Processing relationship meta for schedulers_times...done
Processing relationship meta for inbound_email...done
Processing relationship meta for users...done
Processing relationship meta for campaign_log...done
Processing relationship meta for dashboards...done
Fatal error: main(): Failed opening required '' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/sugarcrm/modules/Administration/RebuildRelationship.php on line 34
Hello Ajay.
Inserting your code showed that there is a blank $bean and $ile in the array. Putting in an "if" statement to skip those, appears to allow the script to run to the end and fixed some other sql related messages that were cropping up in at least accounts in the CRM. I don't know what the source of the empty bean and file is.
Thank you for looking into this. If you find the real root of the problem, please post here.
Cheers,
--Bill
The problem is that when you install a module it creates a table, sometimes you don't want that and you can skip that part, but when you go on rebuildrelationships.php it takes all of the beans (even the ones that does not have an table) and try to rebuild.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks