Closed (fixed)
Project:
ShareThis
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
23 Sep 2011 at 18:09 UTC
Updated:
19 Oct 2011 at 17:20 UTC
Jump to comment: Most recent file
When I installed the module both locally, and again on my server, it seemed to install fine, no errors. But when I went to the configure page, I see this:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cw_62303_foodhero.st_table' doesn't exist: SELECT st.st_option, st.st_value FROM {st_table} st; Array ( ) in get_options_array() (line 332 of /...../sites/all/modules/sharethis/sharethis.module).
On both sites, I had to uninstall the module (not just deactivate it, but also uninstall), then install it again, and it worked the second time. Weird?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | variables.patch | 8.33 KB | robloach |
Comments
Comment #1
robloachWe don't really need a whole new table for this. The upgrade path should be supported though.
Comment #2
jvalencia commentedIf you use the variables table though, there is the chance of namespace conflicts.
Comment #3
robloachNot if we prefix the variables with "sharethis_" :-) .
Comment #4
jvalencia commentedWhat's the upgrade path then?
Comment #5
robloachI'll upload a patch here for testing once I get some time to work on it.
Comment #6
jvalencia commentedLooking forward to it :-)
Comment #7
jvalencia commentedThinking about it some more...
If we add some of the other widgets ShareThis uses to the module, we may add another dozen or so variables. Would we still want to put them in the variable table? Is there any benefit?
Comment #8
robloachThe variables table is loaded on each page load and heavily cached. Probably more performant to use that versus our own table which we have to query ourselves each time we want some settings.... Thoughts?
Comment #9
jvalencia commentedJust thinking for the future, perhaps I'll add the widgets in their own dependent modules like I did the block. Then we could use the variables table prefixed with each of the module names (ie sharethis_option, sharethis_bar_option, sharethis_block_option)
That should work?
Comment #10
robloachYup! You have the right idea :-) . Here's a patch that switches from st_table over to the variables table. Mind testing it a little? Seems to work on my end... Make sure to run update.php to transition over your old values.
Comment #11
robloachI went through another thorough test of this and it was all good. I cleaned up the code a bit more and committed it. We could go even further than this and remove the _submit handler completely now... But that's for another issue: #1300526: Remove the Submit handler. Thanks!