<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WP Hive &#187; Topic: Table Prefix broken?</title>
<link>http://wp-hive.com/forums/</link>
<description>WP Hive &#187; Topic: Table Prefix broken?</description>
<language>en</language>
<pubDate>Tue, 07 Feb 2012 23:16:15 +0000</pubDate>

<item>
<title>senlin09 on "Table Prefix broken?"</title>
<link>http://wp-hive.com/forums/topic/table-prefix-broken#post-332</link>
<pubDate>Mon, 04 May 2009 11:12:21 +0000</pubDate>
<dc:creator>senlin09</dc:creator>
<guid isPermaLink="false">332@http://wp-hive.com/forums/</guid>
<description>&#60;p&#62;Hi John,&#60;br /&#62;
I also struggled with this problem.&#60;/p&#62;
&#60;p&#62;I want to start using the hive plugin for different languages sites (once you have had the time for the update, that is) and typically people use 2 letter abbreviations for languages (conform WP_lang basically). That however results in a problem that can only be solved when you manually change the prefix for the subdomain in the wphive_hosts-table.&#60;/p&#62;
&#60;p&#62;To illustrate this:&#60;br /&#62;
main domain: &#60;a href=&#34;http://www.domain.com&#34; rel=&#34;nofollow&#34;&#62;http://www.domain.com&#60;/a&#62;&#60;br /&#62;
sub-domain: en.domain.com&#60;/p&#62;
&#60;p&#62;The plugin automatically makes the prefix for the subdomain en._ and that is not allowed.&#60;/p&#62;
&#60;p&#62;Solution:&#60;br /&#62;
Manually change the prefix for the subdomain in for example en1_ and hopla, problem solved!
&#60;/p&#62;</description>
</item>
<item>
<title>ikailo on "Table Prefix broken?"</title>
<link>http://wp-hive.com/forums/topic/table-prefix-broken#post-267</link>
<pubDate>Thu, 05 Mar 2009 15:44:47 +0000</pubDate>
<dc:creator>ikailo</dc:creator>
<guid isPermaLink="false">267@http://wp-hive.com/forums/</guid>
<description>&#60;p&#62;1. Yes. I never imagined that someone would install multiple hives on a single database. I think that will be changed one day.&#60;/p&#62;
&#60;p&#62;Currently, once the table prefix is set by wphive, the &#60;code&#62;$table_prefix&#60;/code&#62; variable that is set in &#60;code&#62;wp-config.php&#60;/code&#62; is lost forever. I guess we could store it somewhere, but I don't see the need for that. In actuality, it was not designed be a parent / child type relationship. More like brother / sister with a default prefix (the one stored in &#60;code&#62;wp-config.php&#60;/code&#62;) in case WP Hive gets uninstalled.&#60;/p&#62;
&#60;p&#62;2. The &#60;code&#62;wphive_hosts&#60;/code&#62; table lists the prefix / domain name pairs. &#60;/p&#62;
&#60;p&#62;The reason for the short prefix was that the default, &#60;code&#62;wp_&#60;/code&#62;, was short, and I just followed suit.&#60;/p&#62;
&#60;p&#62;3. The prefix generation algorithm bases the prefix on the first few letters of the domain name, so if your names were &#60;code&#62;subA.domain.com&#60;/code&#62;, &#60;code&#62;subB.domain.com&#60;/code&#62;, &#60;code&#62;subC.domain.com&#60;/code&#62;, etc.. then the prefixes should be &#60;code&#62;sub_&#60;/code&#62;, &#60;code&#62;su1_&#60;/code&#62;, &#60;code&#62;su2_&#60;/code&#62; etc...&#60;/p&#62;
&#60;p&#62;When WP Hive is first installed, it creates an entry in &#60;code&#62;wphive_hosts&#60;/code&#62; for the prefix that is defined in &#60;code&#62;wp-config.php&#60;/code&#62;, so the site can remain active and accessible.
&#60;/p&#62;</description>
</item>
<item>
<title>mpwalsh8 on "Table Prefix broken?"</title>
<link>http://wp-hive.com/forums/topic/table-prefix-broken#post-258</link>
<pubDate>Thu, 05 Mar 2009 00:06:51 +0000</pubDate>
<dc:creator>mpwalsh8</dc:creator>
<guid isPermaLink="false">258@http://wp-hive.com/forums/</guid>
<description>&#60;p&#62;Thanks for the quick response, some more things to think about.&#60;/p&#62;
&#60;p&#62;1)  If the hive tables need to be hardcoded, wouldn't that eliminate the possibility of having multiple hives reside in the same database?  If the hives tables took on the prefix of the host (parent?) blog, is there anyway for the other blogs (children?) to know what their parent blog is?  Isn't the prefix in the wp-config file?&#60;/p&#62;
&#60;p&#62;2)  A generated name is better than a conflict but how can I correlate the tables with a blog?  Having to look at the tables isn't something I do frequently but it does become necessary from time to time.  What is the reason to shorten it in the first place?&#60;/p&#62;
&#60;p&#62;3)  For my top level blog, I set the database prefix to be &#34;abc_&#34;.  When I created the second blog (demo), the tables were created with a prefix of &#34;dem_&#34;, I would have expected them to also have the &#34;abc_&#34; prefix.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Mike
&#60;/p&#62;</description>
</item>
<item>
<title>ikailo on "Table Prefix broken?"</title>
<link>http://wp-hive.com/forums/topic/table-prefix-broken#post-255</link>
<pubDate>Wed, 04 Mar 2009 21:47:37 +0000</pubDate>
<dc:creator>ikailo</dc:creator>
<guid isPermaLink="false">255@http://wp-hive.com/forums/</guid>
<description>&#60;p&#62;Hi Mike,&#60;/p&#62;
&#60;p&#62;1. The wphive_host and wphive_config tables need to be shared between all the sites in the hive, hence the reason for the the hardcoding and no prefix (technically, the prefix is 'wphive_').&#60;/p&#62;
&#60;p&#62;2. We could use the whole subdomain name for the prefix if necessary. Might change that later. However, currently if multiple sites with the same first letters are added, it will generate a unique prefix eg: 'aa1_', 'aa2_', etc.. (note: there is a known bug when adding the third site automatically, so might have to do it manually)&#60;/p&#62;
&#60;p&#62;3. Not sure what you mean by the second blog not using the prefix. It's intended to use a unique prefix for each site. If it's not doing it, then it's a bug.. Can you send me more details about it?&#60;/p&#62;
&#60;p&#62;Never thought about having multiple hives in a single database before, but you bring up a valid point! Will most likely work that into a future version.&#60;/p&#62;
&#60;p&#62;Thanks for your feedback.. I am currently working on a new version, which I think you will find to your liking.
&#60;/p&#62;</description>
</item>
<item>
<title>mpwalsh8 on "Table Prefix broken?"</title>
<link>http://wp-hive.com/forums/topic/table-prefix-broken#post-252</link>
<pubDate>Wed, 04 Mar 2009 20:24:27 +0000</pubDate>
<dc:creator>mpwalsh8</dc:creator>
<guid isPermaLink="false">252@http://wp-hive.com/forums/</guid>
<description>&#60;p&#62;This afternoon I got wp-hive working with a main blog and one new blog.  I was poking around the database and noticed a couple of things:&#60;/p&#62;
&#60;p&#62;1)  The wphive tables don't use the prefix I have setup for my primary WP installation.  I think this needs to be fixed and is trivial to do so.&#60;/p&#62;
&#60;p&#62;2)  The second blog I created which is managed by wp-hive has a 3 letter prefix based on the domain name - why not use the entire subdomain prefix?  For the project I am thinking of using hive on, there will be 6-8 subdoamins which are all very similar and in each case, the first 3 letters are replicated across at least one other subdoamin.&#60;/p&#62;
&#60;p&#62;3)  Like the wphive tables, the tables for the second blog do not make use of the database prefix either.&#60;/p&#62;
&#60;p&#62;Looking at the code, the wp-hive tables are hard coded which would prevent setting up more than one installation in a single database.&#60;/p&#62;
&#60;p&#62;I like the potential of this, but I'd like to see a couple things like this fixed before I commit it to a real project.&#60;/p&#62;
&#60;p&#62;Mike
&#60;/p&#62;</description>
</item>

</channel>
</rss>

