Hi.
I'm getting this message when trying to access shoutbox settings page in Drupal 7:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.profile_fields' doesn't exist: SELECT name FROM {profile_fields} ORDER BY name ASC; Array ( ) en shoutbox_admin_settings() (line 82 of /var/www/SITE/sites/all/modules/shoutbox/shoutbox.pages.inc).
This is what I find in line 82 of shoutbox.pages.inc.
// Generate choices for profile fields
if (module_exists('profile')) {
// TODO: Make this work in D7
$choices = array();
$fields = db_query("SELECT name FROM {profile_fields} ORDER BY name ASC");
while ($field = db_fetch_object($fields)) {
$choices[$field->name] = $field->name;
}Any idea?
Comments
Comment #1
taecelle commentedsubscribe - same problem
Comment #2
taecelle commentedAny help??
Comment #3
Golem07 commentedVery same problem here after an upgrade D6.22 to 7.10!
Comment #4
Golem07 commentedFound the solution for my upgraded site:
I got suspicious when I noticed that the profile fields management on my upgraded site still looked exactly like in d6.
So I went to the modules section and simply disabled and uninstalled the core module "profile". Et voila! everything looked like it should look like on a D7 install again. Shoutbox admin interface is working now.
Didn't realize before that the "profile" module is not even listet on D7 modules page any more. Seems like a left-over from the D6 install. After uninstalling you won't even get the option to install it again.
Hope this helps!
Comment #5
taecelle commentedFound the solution
There are some errors in code, because the difference between drupal 6 and drupal 7.
That's how code must be:
because in drupal 7 function db_fetch_object is removed, and in database there is no profile_fieldS, but there is profile_fileld.
Comment #6
snsace commentedsubscribe
Comment #7
snsace commentedI tried fix in #5 but now get a white screen when accessing admin.
Disabling the core "Profile" module does work but the downside to that is you lose user's profile info they have set up in their accounts.
Comment #8
snsace commentedComment #9
farald commentedUnrelated to this module..but might be useful.
I got same error on update.php regarding profile.module.
It tries to find out whether or not a table exists in user.module, here:
But then db_table_exists panics. Sure this isn't a core related fault?
I ended up installing profile.module and then disabling it to overcome the issue.
Comment #10
Arjean-1 commentedThanks to taecelle #5 I could make it work.
Only in the foreach loop the "=" had to be "as".
So my code becomes:
file:shoutbox.pages.inc (row 79)
When selecting an option in the shoutbox settings from the "Use profile field for user name" the front page crashed,
so had to change the following too:
file:shoutbox.module (row 334)
That made it all work for me.
Comment #11
Oleksa-1 commentedthx
Comment #12
plazik commentedThanks Arjean.
#10 works for me.
Comment #13
noctifer commented#10 works like a charm
Comment #14
noctifer commentedBeautiful. Thank you.
Comment #15
vitalblue commentedHi to all,
I tested the code above and applied to the module. Thank anyone for your help.
I took a further look for profile module in Drupal7 and I found that is deprecated. https://drupal.org/node/874026
So as profile module is deprecated I manage to include any field, text type, that will be added to user
Admin-Configuration-People-Account settings-Manage fields
I had in mind to include Profile2 but I'm not sure if this is needed now or not.
Please get latest 7.x-1.x-dev version to check.
Thanks a lot.
Comment #16
vitalblue commented