English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

Problem with table prefix, Fabrik and JoomFish
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Problem with table prefix, Fabrik and JoomFish
#3948
Problem with table prefix, Fabrik and JoomFish 14 Years, 8 Months ago Karma: 0
Hi. I recently purchased JMS and am using it in a combination with Fabrik and JoomFish. Overall, the experience has been quite good. However I'm running into an issue which I believe to be related to JMS.

In Fabrik I have the option to create JoomFish translations for data within tables. Fabrik generates an XML file specific to a table and JoomFish lets me select it as an option to perform translations against the data.

The issue is that I believe JMS is appending the site's table suffix in front of the table, even though it shouldn't be.

JoomFish Error Message on Master Site (table prefix jms_):
DB function failed with error number 1146
Table 'mc_bpjms.jms_fab_countries' doesn't exist SQL=SELECT c.country_id as id, c.country_id, c.country_name as title, c.country_name, c.nationality, jfc.id as jfc_id, jfc.value as titleTranslation, jfc.modified as lastchanged, jfc.published as published, jfc.language_id, jfl.name as language, jfc.reference_id as jfc_refid FROM jms_fab_countries as c LEFT JOIN jms_jf_content as jfc ON c.country_id=jfc.reference_id AND jfc.reference_field='country_name' AND jfc.reference_table='fab_countries' AND jfc.language_id=1 LEFT JOIN jms_languages as jfl ON jfc.language_id=jfl.id ORDER BY c.country_name LIMIT 0, 20


JoomFish Error Message on Slave Site (table prefix js1_):
DB function failed with error number 1146
Table 'mc_bpjms.js1_fab_countries' doesn't exist SQL=SELECT c.country_id as id, c.country_id, c.country_name as title, c.country_name, c.nationality, jfc.id as jfc_id, jfc.value as titleTranslation, jfc.modified as lastchanged, jfc.published as published, jfc.language_id, jfl.name as language, jfc.reference_id as jfc_refid FROM js1_fab_countries as c LEFT JOIN js1_jf_content as jfc ON c.country_id=jfc.reference_id AND jfc.reference_field='country_name' AND jfc.reference_table='fab_countries' AND jfc.language_id=1 LEFT JOIN js1_languages as jfl ON jfc.language_id=jfl.id ORDER BY c.country_name LIMIT 0, 20


JoomFish Fabrik Table XML File Contents:
Code:

<?xml version="1.0" ?>
<joomfish type="contentelement">
  <name>Fabrik - Countries</name>
  <author>rob@pollen-8.co.uk</author>
  <version>1.0 for Fabrik 2.0</version>
  <description>Definition for Fabrik Table data - Countries</description>
  <reference type="content">
   <table name="fab_countries">
<field type="referenceid" name="country_id" translate="0">country id</field>
<field type="titletext" name="country_name" translate="1" length="30">country name</field>
<field type="text" name="nationality" translate="1" length="30">nationality</field>
   </table>
  </reference>
</joomfish>



As you can see, the table name in the db is fab_countries, but in both cases JMS is trying to append the site's prefix. How can I stop this?
mediacake
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3949
Re: Problem with table prefix, Fabrik and JoomFish 14 Years, 8 Months ago Karma: 54
JMS does not add anything and the tables are created when you create the website.
In joomla ALL tables are prefixed with something.
So when you replicate a website, this copy all the table with "prefix" X into another (or same DB) with the new prefix you have provided.

If you change the DB layout aftrer the copy (replication), JMS is not informed and you have to uninstall / reinstall to rebuild the concerned tables or re-apply the modification in the slave site.

When you share tables, MySQL (not JMS), is not informed of the layout and therefore you have to "uninstall" / "re-install" the shared extension to inform MySQL of the new layout.

So in your case, if you changed the layout of a table, JMS is not informed.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3954
Re: Problem with table prefix, Fabrik and JoomFish 14 Years, 8 Months ago Karma: 0
I understand that in general Joomla tables are prefixed, however Fabrik allows user-defined tables, which I have not prefixed with the site's prefix. I use fab_ to differentiate them from Joomla-managed tables. So are you saying I need to reinstall Fabrik and JoomFish every time I make a table change? I can understand this in the slave sites, but using Fabrik to modify tables, then deinstalling/reinstalling it so that those changes take effect seems counterintuitive.

In the above example, the site prefix is clearly being added onto the SQL query, but no prefix_fab_ tables exist. They are simply fab_. So what is causing this prefix to be appended during the JoomFish query? I'm just not clear on what needs to be done here. Deinstalling/reinstalling extensions every time a table change is made really seems like overkill, and will be problematic when there are 20+ sites to manage.
mediacake
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3955
Re:Problem with table prefix, Fabrik and JoomFish 14 Years, 8 Months ago Karma: 0
Well, I just did some further testing and it seems like this problem occurs even without JMS installed. So I apologize for coming here first - just seemed like the most logical point at the time. At any rate, I'll be moving this thread to the JoomFish forums

Thanks for the quick reply anyway.
mediacake
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3956
Re:Problem with table prefix, Fabrik and JoomFish 14 Years, 8 Months ago Karma: 54
If you want that JMS replicate tables, you have to provde the same prefix as the website.
So that you "speciifc" tables will be replicated in the same times than the others.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla