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?

Slave template and sharing not working
(1 viewing) (1) Guest
Go to bottomPage: 1234
TOPIC: Slave template and sharing not working
#14312
Slave template and sharing not working 6 Years, 3 Months ago Karma: 0
Hello Edwin,

I belong to the group of the first purchasers of JMS, starting from its first years and then seen it growing. Before 8 years or so, we have even spoken by telephone. Basically, I have thoroughly understood the concept of making slave sites. I have even used in its earlier versions beginning from Joomla 1.5.

For some reason, I did not use Joomla after purchasing JMS 1.3 any more. Now I want to use it.

Recently, I tried to configure it on J 3.8.12.

One of the first error I received was that of Folder loop that was caused due to openbase_dir restriction. I had to change the http.conf to have it lifted and to touch outside the public_html. This is bad because it opens doors to security issues. This problem came definitely from checkpatches.

After rectifying this problem, I have now problems of creating slaves. Creating master as replica and share is no problem.

However, when a domain is created with its links on a separate http dir of public_html, all tables with new prefixes are created. In the tools, I cannot add, delete or uninstall any tables, components, modules, etc. They are read only in slave.

In the template, I have seen that I could click on the tab for sharing. In there, I only have a choice to choose sharing of users.

In the earlier versions, I had known that one could choose different tables for sharing components, etc. This is not available.

The users are also not shared. New users gets created into the slave site. I want to have them shared.

I have tried to use both, sharedMaster and replicamaster templates, as well as fresh slaves template. I can install a slave domain, create links except that I cannot choose components to be or not to be shared of users not getting shared

Any suggestions as to where I could be making a mistake? May be I do not have a template in my system or something is missing. The check patches shows all green.
jms2win_user
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#14313
Re: Slave template and sharing not working 6 Years, 3 Months ago Karma: 0
Some more info:

All tables from master are cloned into slave.

The master and slave sites resolves from its respective different directories without any problems, especially the slave is served from linked dirs.

With this information, many possibilities of problem areas can be excluded.

The user registration and changes functions independently on both sites and are not being shared, which is what I want.

These sites are fresh and empty sites. They do not have any component or plugin. Its fresh J 3.8.12 with JMS 1.3.
jms2win_user
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2018/09/12 22:55 By jms2win_user.
The administrator has disabled public write access.
 
#14314
Re: Slave template and sharing not working 6 Years, 3 Months ago Karma: 54
Thank you for your fidelity and I have retrieved your info that show that you are effectivelly an early adopter (oct-2008). Almost 10 years.

First, concerning the open_basedir, this depends on your Server Administration tool and how you have defined domains.
For example, under cPanel you have to create all the website under the same cPanel account and use the "Addon Domains".
In Plesk, you have to use their subscription to declare all the domains under the same subscription and have the correct permission.

The sharing of the table was always been depending on extensions.
We never provided any JMS that allow choosing which MySQL table that can be shared or not. The reason is related to the consistency of data. You can not share a table if there are reference inside this table to another table that would not be shared.
This is the reason why we do manual review to declare which extension and decide which one can be shared or not.
As you mentioned that the "JMS Template" only propose you to share the users, this means that you don't have any other extensions containing a sharing definition.

If you think that some extensions could be shared and that you would like that we proceed with a review of them, please send us their installation package and precise for which version of Joomla you would like that we do this review.

When a website is created with the sharing, use the JMS Tool and the "table tab" to verify if you have a link.
Remark: the sharing is defined the first time that the website is created.
Change the JMS Template to add the sharing after that you have created the slave site will not have any effect because the tables are already present.

replicMaster do a copy of the tables. (Replication means Clone, Copy)
shareMaster should create sharing of the #__user% and #__session tables when the website is created. The list of sharing pattern can be saw in the JMS Template "sharing tab". The sharing patterns can also be saw in the JMS Tools / Component tab.

The sharing of MySQL table is NOT related to the installation of the patches.
The patches are required for the PHP code and not for the DB.

As this is fresh website, I suggest that you delete the slave site and select "delete the DB" to ensure that all the tables are deleted.
Verify the shareMasterXXX table that you want has the sharing of users correctly selected. Potentially review which directory must have a symbolic link and also the one that could be ignored like "license.txt", "readme.txt", ...
When done, you can re-use the shareMasterXXXX rule to create your slave site.

Cross-check with the JMS Tools that you have now the #__users table that is shared.
Becarefull that some browser may have cache and that the data might not be refreshed correctly.
Another possiblity is to use the PHPMyAdmin to verify that you a VIEW instead of a TABLE for the #__users in the slave site that you have created.

The sharing is illustrated in the tutorial video #16.
www.jms2win.com/en/tutorial#jms12x-16

I hope this will help you
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
Last Edit: 2018/09/13 10:20 By edwin2win.
The administrator has disabled public write access.
 
#14315
Re: Slave template and sharing not working 6 Years, 3 Months ago Karma: 0
Hello Edwin,

Thanks for your explanation. As I am experienced on Linux since 21 years, I have deeper understanding on many such things.

Had I exercised my patience, then I would _NOT_ have placed my "first" post in the last ten years. I am not used to asking for solution or support on such small matters. I have solved the problem now myself. The current templates are the culprits, as they did not map sharing of users. Using the default templates, sharing of users did not work. Thus, I created a new template, configured everything from scratch and applied it to the slave. Sharing of users worked immediately.

When I deleted the slave, it did not offer me deletion of the cloned database tables. I did it manually from phpmyadmin.

The scripts have problems and requires updating of codes.

Regarding openbase_dir, you are partly true. My configuration of http.conf was perfect. The JMS scripts required me to open certain other dir. I have done this with a protected htaccess. When I am finished, I will close the openbase_dir and have it function within the dir-shell.

> If you think that some extensions could be shared and that you would like
> that we proceed with a review of them, please send us their installation package
> and precise for which version of Joomla you would like that we do this review.

You chose the term "sharing" everywhere. In theory, you coded php scripts to clone all tables with users sharing. It would be better to use the term "cloning tables" everywhere instead of sharing and the term "sharing" only for the purpose of "user sharing". This way, English speakers would understand these things quicker and clearer.

It is wrong to think that everything should be cloned and nobody may need to have tables shared, other than user tables.

For example: What if I have a few profile tables that are associated with user tables? I will need to have them in the master DB. What will happen with slaves? I will have to create links to the master domains from the slave domains to have changes in users profiles made. Here, there will be a chaotic mix of slaveOne.com for login and master.com for changes of profiles. If I have profile tables cloned to slaveOne.com, then what about other slaves, like slaveTwo.com, etc.?

Let me give another example: What happens if I have a category table, one country, states and cities table? How can I could use it in slave domains? Currently, I could only clone them. MaxMind and GEOID offers these infos. They costs about 40 Megabyte per language. What happens if one has 30 - 100 domains, where country/states/cities data is to be used in the registration forms? Here, while the user tables are shared, but their associated tables are not.

Lets say what happens when I use categories IDs in blogs and directories? They could be the same within the same server under different DB with Joomla. One could use Ajax to get the geo_id, country_id, state_id, city_id, cat_id, subcat_id, etc. in registration, profiles, directories, etc. These IDs should remain the same between multiple installations of Joomla. Likewise, as you see in this example, there are number of reasons why there is an urgent need to have shared concept, while keepong the cloning technology as it is.

A solution of this option is to have a field in the shared table to be added, for e.g. "site_id". If the value is 0, it could work as global for all connecting DBs. Otherwise, it may have the domain.com in it.

With this solution, you could then have FlexiContent to be shared too, which you earlier claimed to be difficult or not possible. Other developers could offer a FlexiContent Plugin to work with JMS multisite, or you could offer it as well.

Above all, I would welcome if you could enhance such a feature in the current version to work with Joomla 4.x. If you bring out a new JMS version, I am afraid I will not be able to buy and will not enjoy its benefit.
jms2win_user
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2018/09/13 11:44 By jms2win_user.
The administrator has disabled public write access.
 
#14317
Re:Slave template and sharing not working 6 Years, 3 Months ago Karma: 0
Hello Edwin,

I have now found out where exactly the problem was and is. When I created a new template and got user sharing to function with it in the slave site, I could not achieve the same sharing function of user tables between databases in the slave site with that new template, specifically after I deleted and re-created the slave site.

The lacking function got repeated. In the newly re-created slave site based on functioning template DID NOT WORK!

Thus, there is no bug in predefined templates. It is the procedure of creating a slave site during the configuration steps. One additional function is missing. The problem is that the scripts do not generate VIEWS in SQL user tables later on if one uses the initial stage of mapping master to a slave for file and folders without DB mapping.

Finally, I created SQL VIEWS in the slave site for all related user tables manually. Then sharing works, as it works on VIEWS.

So the problem is that the creation of VIEWS for user tables in a slave database is missing. This could be easily added or modified to offer admins to add a user function at a later date. Here, one should warn admins that adding the function to share users later means dropping user tables in the slave database.

The same thing you could offer for every other component to be shared in the slave. It is just the matter of creating VIEWS in slave database to be linked to master database. Because this functions already exists, it should be no problem to offer your clients this functions.

For example: What if one uses membership components? Even here, one needs to generate and map VIEWS of all tables of this component to the master database.

So long as this function is not implemented in php, I am afraid I will have to do it manually for all other components.

For all other users: You are welcome to ask me how to do this manually. Then, I could offer a generic code to generate VIEWS for user tables to be inserted in SQL monitor in phpMyAdmin.
jms2win_user
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2018/09/14 09:01 By jms2win_user.
The administrator has disabled public write access.
 
#14318
Re:Slave template and sharing not working 6 Years, 3 Months ago Karma: 54
1) Concerning the open_basedir, if you setup the httpd.conf manually, perhaps that you could get inspired from plesk and their subscription.
In their case, they have the account directory that have under that domains/ and httpdocs directories for all the domains website. We get inspired of them when recommending our directory structure like
/domains/<NAME OF DOMAIN>/public_html
and /domains/<NAME OF DOMAIN>/subdomains/>SUB DOMAIN/public_html.
See our Powerpoint page www.jms2win.com/en/documentation/doc_download/27-
page 16

Therefore, if the open_basedir point on the "/domains" directory of the account, this is OK.

2) Concerning potential issue on the delete and cleanup of the DB tables, you are the first in to report that. Perhaps that the MySQL user / password was wrong and didn't allow JMS to connect on the DB to remove the table.

3) As explaines, JMS can share several extensions and is not limited to the users.
Perhaps that you prefer the word "clone" to "replication" but I think that the word "sharing" remain valid and is correct on what we do when selected.
English is not my native language. So I can accept your definition but I think it is too late to change that in JMS as everybody know my terms now.

4) Concerning of sharing of other tables (your example SlaveOne.com), if they are managed by "public" extensions like Community Builder, JomSocial, EasySocial, Hikashop, VirtueMart and many other extensions, you have probably saw that those extension are proposed for the sharing.
You have the choice to share them or not depending if you want to have the relationship with the "parent, template site" (not necessarily the master).
All depends if you want to keep their data specific or shared with the "parent" website.
In most cases, when you share an extension like CB, JomSocial, ... you also have the joomla users that are shared.
There are some exception like "Widget kit" that does not require the user and that you can share independently.
So this is you that know when you create the architecture and dependencies of your website that know which tables must be shared to keep the consistency of the data.

5) Concerning the "category", all depends the extensions.
When the extension use the Joomla #__category table then the extension can NOT be shared.
Most extension are using their own table to manage the categories. In this case their content can be shared.
In very few specific case, if you architecture show that you need sharing of the joomla categories, it is possible to create a specific plugin to declare such specific sharing in JMS.
We already did such kind of thing when you have for example a website that is in fact a webshop for which you want to share everything except very minor table like configuration to be able providing specific shop name, address, email. Otherwise, you share all products, orders, ...., everything.

So you have to do a deep analysis of the relationship between the data that needs to be shared and cross-check the potential consistency issues.
This is the reason why we do not provide such table selection because we can not guarantee that doing such complex thing will not cause consistency issues.

6) Concerning MaxMind, when using JMS Medium, it is included and all the data are available to all the website.
MaxMind use files on the disk that are shared.
There is nothing in the DB.
What is generally happening is that each extension have their own copy of MaxMind data and re-doing the same.
So you may have several copies of the MaxMind files and this is the same with a standalone website. You have several copies in each extensions that use their APIs.
Therefore this is NOT related to the number of website and you can have 1000 website and will just have one instance of their "GeoIP.dat" "GeoLiteCity.dat" in each extension (not in each site).

7) In the case where you would share a Blog content (ie EasyBlog) in which you want to write a page that provide reference to something (ie. using a category), you have to provide a full URL (external link) including for images or any material to ensure it is NOT related to you current website and can be found from any places. Becarefull that when using JCE or similar editor, they may replace a full URL by a relative URL - that is wrong.

8) Your proposal to add a column with "Site ID" is something that we doing for partial sharing when the author of an extension accept to enhance their extension with additional functionality when JMS is present.
This is what we are doing with Hikashop, HikaMarket, EasySocial and other extension (JomSocial declined to do it).
With Hikashop, it is for example possible to create specific Hikashop categories that are only saw by specific website. We can also have specific price, specific currencies, specific taxes and many other things.
This allow for example have a website in UK that deliver good in currency GBP and and another website in Ireland that deliver goods in EUR and have a different tax rate. In fact the different website share the same warehouse and same inventory but the deliveries are done for a specific website (entities).

So if you have such kind of needs, you have to do a deep analysis and select the appropriate extension that can cover your needs.

9) Concerning FlexiContent, as they can impact everything, we can not guarantee the consistency of the data.
Therefore, if you need such kind of things, this must better considered as a specific development than a product that could leads to plenty is issues.

10) Concerning Joomla 4, we are waiting the Beta before verifying the compatiblity.
In the past, when we did such kind of thing with J3 and previous in Alpha we had to redo the job.
So we prefer to wait that the J4x functionalities are frozen before verification.

11) Concerning the "VIEWS" and the possibility to replay the actions, we effectively don't write into a log such kind of info.
What you have is the "Maintenance" menu that provide you some partial information when DB structure mismatch is found. In the case of a VIEW it can propose the repair as MySQL statement. To use with cautions.

12) Again concerning the sharing of the users, a pre-requisite is to use a MySQL user that have the permission to create the VIEW and have access on both DBs. Otherwise, the creation of a VIEW is not allow and just a copy of a TABLE is possible. Verify the MySQL user privileges and access on the DBs.

I hope this answer all your questions
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: 1234
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla