Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When saving a view I encounter this error message: The plugin definition of fb_social_ctools_export_ui cannot locate schema fb_social_preset.
Comments
Comment #1
rickmanelius CreditAttribution: rickmanelius commentedThis 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).
Comment #2
rickmanelius CreditAttribution: rickmanelius commentedIt 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?
Comment #3
rickmanelius CreditAttribution: rickmanelius commentedSubmitting 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.
Comment #4
rickmanelius CreditAttribution: rickmanelius commentedComment #5
ferdi CreditAttribution: ferdi commented@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
Comment #6
rickmanelius CreditAttribution: rickmanelius commented@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.
Comment #7
rickmanelius CreditAttribution: rickmanelius commented#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.
Comment #8
marktheshark CreditAttribution: marktheshark commentedStill an issue in 6.x-2.0-beta2.
Comment #9
mostou CreditAttribution: mostou commentedI 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.
Comment #10
BrightBoldSame 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.
Comment #11
deanflory CreditAttribution: deanflory commentedI'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:
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...
Comment #12
iamEAP CreditAttribution: iamEAP commentedThis 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.
Comment #13
iamEAP CreditAttribution: iamEAP commentedMinor coding style issue: indentations.
Comment #14
srjosh#13 worked for me. Thanks!
Comment #15
sjf_ddev CreditAttribution: sjf_ddev commentedIssue: 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.
Comment #16
Einkahumor CreditAttribution: Einkahumor commented#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?
Comment #17
sjf_ddev CreditAttribution: sjf_ddev commented#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!
Comment #18
sjf_ddev CreditAttribution: sjf_ddev commentedOops!! Missed file to attache, Please find the attached file here.
Thanks!
Comment #19
sarhansg CreditAttribution: sarhansg commentedPatch from #18 gives the following error
Comment #20
dagido CreditAttribution: dagido commentedDid 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 ...
Comment #21
jefbak2 CreditAttribution: jefbak2 commentedNo 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.
Comment #22
DamienMcKennaThe last patch was actually for Drupal 7 so wouldn't work on D6. This version is for D6.
Comment #25
ferdi CreditAttribution: ferdi commentedcommitted, thanks