Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rickmanelius’s picture

This is also an issue in D7. When I turn on the module, I get the following error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db_name.drupal_fb_social_preset' doesn't exist: SELECT t__0.* FROM {fb_social_preset} t__0; Array ( ) in ctools_export_load_object() (line 427 of /vhost/server1/trunk/public_html/sites/all/modules/ctools/includes/export.inc).

rickmanelius’s picture

It appears that the fb_social_preset schema is located in fb_social.install... but the hook_install function does not include a call to drupal_install_schema.

Was the schema dropped in exchange for vars?

rickmanelius’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
FileSize
269 bytes

Submitting a patch for the 7.x branch to add the drupal_install_schema function back in. This makes the 7.x branch useable for me.

rickmanelius’s picture

Status: Active » Needs review
ferdi’s picture

@rickmanelius I though in D7 you dont need to explicitly call drupal_install_schema in hook_install
http://drupal.org/update/modules/6/7#install-schema

rickmanelius’s picture

@ferdi. Interesting... well it wasn't until I added that line that the error went way. Let me try uninstalling and reinstalling again. Perhaps I had something caught.

rickmanelius’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Needs review » Active

#5 @ferdi You're right! It seems like this borked during the upgrade from D6 to D7. When doing an uninstall/reinstall, it works fine. It must have been upgrade path related, etc.

Setting back down to 6.x in case this is still an issue there.

marktheshark’s picture

Still an issue in 6.x-2.0-beta2.

mostou’s picture

I also had the same error when installing. I couldn't access /admin/build/fb_social_presets

However uninstalling and installing the module again without the patch solved my issue.

BrightBold’s picture

Same error message as in the OP when I install 6.x-2.0-beta3. So I uninstalled and installed the latest dev version, but I still get that error. However, I am able to access /admin/build/fb_social_presets, and when I went ahead and added a preset, the module seems to work fine — I now have a lovely Likebox on my homepage.

So in my case, I can't tell that anything was actually wrong, other than the fact that I got an error message.

deanflory’s picture

I'm having the same issue here with fb_social-6.x-2.0-beta4:

user warning: Table 'XXXXXXXXX.fb_social_preset' doesn't exist query: SELECT * FROM fb_social_preset t__0 in /home/XXXXXXXXX/public_html/testsite/sites/all/modules/ctools/includes/export.inc on line 378.

I guess I'm going to have to take an hour or more to try these instructions since it appears this isn't going to get fixed in the module:
http://drupal.org/node/1365646#comment-5359530

Posted by MPankau on December 13, 2011 at 4:56pm
I just ran into this same problem and resolved it by doing the following:

  • Disable the fb_social module
  • remove the fb_social module from your filesystem
  • Run update.php
  • Use the devel variable editor and delete all the fb_social_ variables
  • Access the 'system' table via phpadmin or similar tool. Find the rows for the fb_social plugin and delete them.
  • run update.php again
  • Add the module to the filesystem again
  • Enable the fb_social module
  • run update.php

This will erase all your presets and settings, so either write them down first or figure out how to export them.

Fingers crossed this will work...ho hum...

iamEAP’s picture

Title: cannot locate schema fb_social_preset » Schema needs to be installed when upgrading from 6.x-1.x
Version: 6.x-2.x-dev » 7.x-2.x-dev
Component: User interface » Code
Priority: Normal » Major
Status: Active » Needs review
FileSize
2.12 KB

This is an issue in the 7.x version. Changing the version back. Also changing the title of the issue to reflect what this is actually about.

Schemas are only installed if the module is being installed for the first time. When upgrading, this is not the case.

#3 is not the correct solution as hook_install() will not get called for sites going through an upgrade. This is because hook_install() is only called when the module is enabled for the first time, or when it's enabled after being uninstalled. During a normal upgrade process, the module should only be disabled, not uninstalled.

As such, this module needs to implement hook_update_N() to manually install the new schema. I'm attaching that patch here.

Marking this as "major," given that those going through an upgrade path from 6.x-1.x cannot use the module without something like the attached patch.

This does not take care of a full upgrade path completely it, just solves the missing table problem.

I'll create a separate issue for a full upgrade path between 6.x-1.x and 7.x-2.x.

iamEAP’s picture

Minor coding style issue: indentations.

srjosh’s picture

Status: Needs review » Reviewed & tested by the community

#13 worked for me. Thanks!

sjf_ddev’s picture

Version: 7.x-2.x-dev » 6.x-2.0-beta4
FileSize
2.22 KB

Issue: Cant locate schema fb_social_preset

While I was integrating the plugin for 6.x version, Schema was not being installed during installation. Thanks to all contributors above, reviewing I could successfully integrate the plugin and is currently working fine. However, there was an issue while applying the patch. Attached is patch for D6 version.

Einkahumor’s picture

#15 doesn't work for me on 6.x-2.0-beta4. The patch gets applied but when I try to enable the module I just tet this error:

Fatal error: Only variables can be passed by reference in .../sites/all/modules/fb_social/fb_social.install on line 159

Any ideas?

sjf_ddev’s picture

#16 I did come across same problem, Use attached patch it works for me. Apart from this Following are the steps for updating the module, It took a while for me to figure out hope it helps for others here

Download fb_social 6.x-2.0-beta4 version.
Apply Patch for install file.
Uninstall Old fb_social Module .
Delete the old module physically from the folder.
Run Update.php (updb)
Clear cache
Enable new version of fb_social plugin Module
Run Update.php (updb)
Clear cache
Setup Admin settings by using the Module Interface.

NOTE: DO NOT MISS running update.php, if not it throes lot many errors. It took lot of time for me to figure this out. Hope this helps for others.

Thanks!

sjf_ddev’s picture

Oops!! Missed file to attache, Please find the attached file here.

Thanks!

sarhansg’s picture

Patch from #18 gives the following error

Fatal error: Only variables can be passed by reference in /home/.../sites/default/modules/fb_social/fb_social.install on line 159

dagido’s picture

Did it !

Got the same message like #16+#19

deactivated the module
removed the module
update
cleared the Cache
removed all fb_social-entries in the system and variable-tables from the db
applied the patch #13
uploaded the module
activated it
update

Maybe I forgot something ;-)

Happy now ...

jefbak2’s picture

No luck for me. 6.x-2.0-beta4 would not activate after the patch was applied (stays unchecked in module list). Without it I get a schema error for the preset. This is a fresh install, not an upgrade from the 1.x version or anything.
But I can't do the update.php or table check as I can't login as super admin in our workflow without jumping though hoops, so i'll just wait.

DamienMcKenna’s picture

Version: 6.x-2.0-beta4 » 6.x-2.x-dev
Issue summary: View changes
FileSize
2.32 KB

The last patch was actually for Drupal 7 so wouldn't work on D6. This version is for D6.

  • Commit 19d397a on 7.x-2.x by ferdi:
    Issue #1142838 by sjf_ddev, iamEAP, DamienMcKenna, rickmanelius |...

  • Commit 3ef5841 on 6.x-2.x by ferdi:
    Issue #1142838 by sjf_ddev, iamEAP, DamienMcKenna, rickmanelius |...
ferdi’s picture

Status: Reviewed & tested by the community » Fixed

committed, thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.