I am trying to use DA as a way to implement easily manageable "multisites" (each domain must have its own independent forum). As forum/containers are defined as taxonomy terms, I thought that table prefixing all {term_*} would be enough. I now add three containers (terms 87,88,89) that end up in {domain_4_term_data}. Then I add three containers (terms 88,89,90) that end up in {domain_2_term_data}. As I have multiple tables I assume that term numbering is immaterial. Next I add a forum to domain_4: it happens to be term #90. Here is the funny thing: name #90 is correctly displayed in domain_4 forums page... but it is treated as a Container (which is an attribute of #90 in domain_2). Whenever I add an element with a number that is common to both domains I see this cross-contamination (forums being displayed as containers and the other way round). I tried to prefix also {vocabulary*}, but the problem is still there... Is this just unavoidable with the current forum module implementation, or am I missing something that is blindingly obvious? Thank you.
| Comment | File | Size | Author |
|---|---|---|---|
| #50 | domain_taxonomy.zip | 11.05 KB | xanderz |
| #37 | domain_forum.tar.gz | 1.35 KB | pbarnett |
| #12 | Picture 1.png | 25.57 KB | agentrickard |
| #6 | DA-a.jpg | 29.48 KB | skizzo |
| #6 | DA-b.jpg | 30.73 KB | skizzo |
Comments
Comment #1
najibx commentedlooks like DA works together with OG.
So OG forum might fit your requirement? When creating a group, you can select it should be publish to respective domain define under DA?
Comment #2
agentrickardDid you prefix the {forum} table as well?
Comment #3
skizzo commentedyes, but it made no difference.
The forum table remained empty (maybe
it is used when topics are added?)
Comment #4
agentrickardLet me try to reproduce.
Comment #5
agentrickardI think it works. Here's the key:
-- When creating Forums or Containers, you must be on the domain where you want those to appear.
Use the Domain Switcher block for this.
I prefixed the following tables:
-- forum
-- term_data
-- term_hierarchy
-- term_node
-- term_relation
-- term_synonym
See attached.
Comment #6
skizzo commentedI repeated the test several times, and I do see the problem.
Maybe the problem is erratic based on term numbering.
I dropped all tables and "created" 1+5 as per your post, for domain 2 and 4
I configured forums within the proper domain (each domain is color coded)
Created 3 Containers (# 101 102 103) in domain 4, took snapshot DA-a.jpg
Created 3 Containers (# 104 105 106) in domain 2, took snapshot DA-b.jpg
Created Forum (#104) in Domain 4, took snapshot DA-c.jpg
In last snapshot Forum #104 shows up as Container in Domain 4, which is wrong
It was added as forum, but ended up as container (#104 in Domain 2 is ok)
I don't understand how the systems tells apart forums/containers... so I cannot dig
much deeper. I can repeat the test one more time next Monday, and report back.
Have a nice week end...
Comment #7
agentrickardForums go inside containers. http://drupal.org/files/issues/DA-c.jpg seems to be correct behavior.
You may be having a terminology issue?
Comment #8
skizzo@drupal.org commentedI believe it is not correct. If you notice, on the right of "Forum A Domain 4" it says "edit container" instead of "edit forum", and indeed it will be rendered as a container (even if I am pretty sure that I added it as a forum). What I see playing with both domains, is that forums sometimes are added "as forums", and sometimes "as containers". Apparently the latter happens when you hit a number that is already in use for a container in the other domain.
Comment #9
agentrickardInteresting, I missed that. But you should never be sharing container numbers. And I could not replicate the error. I will try again when I get some time.
Comment #10
agentrickardDid you prefix any other tables like the {sequences} table? And is this MySQL or pgSQL?
Comment #11
skizzo@drupal.org commentedIt's mySQL, and the only replicated tables (via Domain Access "create") are the 5 {term_*} tables, plus {forum} and {watchdog}. For weeks I thought it was working nicely, but it was just out of luck... Then I realized I had a problem, and I have been able to replicate it since then. I hope it can be fixed, otherwise many modules which rely on taxonomies may have similar problems.
Comment #12
agentrickardI still cannot replicate this error. I prefixed (from scratch), the {forum}, {term_data} and {term_hierarchy} tables on two subdomains. Then I used Devel modules to create new categories and terms in one of the domains. Then I turned on Forum and created some forums.
[Update: {term_node} must be prefixed as well, or errors will result.]
I am seeing duplicate TID (term_id) numbers, but this is not an issue because they are stored and loaded from discreet tables. There are also prefixed TID sequences in the {sequences} table, which is more than I expected. (See attached.)
Do you have proof that the domain prefix tables are loading correctly? Do your watchdog entries work as expected?
It may be that the prefixed tables are not loading.
You should have a line like so in your settings.php file:
To test, add this after line 20 of 'settings_domain_prefix.inc':
Then load a page. You should see the message 'hello world' and it may be followed by some PHP errors. If the message does not appear, then the module is not installed correctly.
Comment #13
skizzo@drupal.org commentedThe "require_once" line was there, at the bottom of settings.php. I added the "hello world" marker, visited forums in different domains, and did not see any printout. So the tables were not loaded... I did "locate" all files named settings.php and settings_domain_prefix.inc in my system and deleted all spurious ones (some were generated when drush does a backup of old module versions). I cannot investigate better the details as I am now up in the mountains with a 56K modem and remote server, but now I *do* see the "hello world" printout so everything should be ok. I will double check tomorrow, and I will leave the "hello world" there for a while :-). Would it be safe to enter the absolute path for settings_domain_prefix.inc? Thank you very much for your assistance!
Comment #14
agentrickardYes. The problem seems to be that your server cannot find the file. The include depends on how your PHP is configured. One easy fix is in the INSTALL.txt documentation:
Please tell me what include line works for you and I will add something to the documentation. More information here:
http://us3.php.net/manual/en/ini.core.php#ini.include-path
Comment #15
agentrickardBTW, you should also have seen a large warning at the top of Admin > Build > Domain telling you that Domain Prefix was not installed correctly. This information would have saved us a lot of time.
Comment #16
agentrickardAdded the folliowing to INSTALL.txt
Comment #17
skizzo commentedNot having seen the large warning before, and being now positive about the correct inclusion, I wanted to do some more testing and saw the problem again. So maybe it's something else. What puzzles me is that I do not see anything in the terms_ tables that would allow one to tell apart forums from containers: if so, having prefixed tables would be necessary but not sufficient for running multiple forums. Searching around I found http://drupal.org/node/203732 . Could that have something to do with my problem, or does DA handle per-domain variables in anyway? Thank you.
Comment #18
agentrickardNice find.
That variable seems to be the problem. Domain Conf is designed to handle situations like this. What you need is to save those variables to Domain Conf and have them load dynamically per domain.
But forums are complex enough that we'll have to write a Domain Forum module, I think.
Or, don't use containers. Only use forums. :-)
Comment #19
skizzo commentedI thought about using only forums, and tried it... but it looks somewhat confusing for users, as the logic for attaching posts to non-leaf terms will not be obvious to basic users; and indeed... it's a workaround :-). If it weren't for that forum_containers variable, DA Forums should work smoothly. I do not understand the advantages of a specific Domain Forun module over the Domain Conf solution. I wonder if I will step in similar problems whenever I use a non-trivial taxonomy dependent module... I will find out soon, as I was thinking of using Acidfree (category based image gallery) on per-domain basis.
Comment #20
agentrickardThe key is going to be variable storage.
The reason for a separate Domain Forum module would be that the UI for creating forums and containers is significantly different from the normal Domain Conf UI. Domain Theme is an example of this type of choice.
What we likely need is an implementation of hook_form_alter() that intercepts the form submit action based on the active domain.
Comment #21
agentrickardThis is, by the way, going to be an issue for any module where the stored variables have a non-trivial effect on behavior. But only if you want different variable-derived behavior on different affiliate domains.
MySite, for example, does not have an issue _unless_ you want to use Droplets on one domain but not on another.
Comment #22
agentrickardI'm going to mark this as a feature request, and postpone it until after the stable release. We need some system that allows specific forms to be saved for each domain. I know how I want to do this, but we have to get the first release out.
Feature:
-- Allow Domain Conf to show the $form_id values on admin settings pages.
-- Allow $form_id calues to be added to a Conf array.
-- Save forms in that Conf array to the Domain Conf table unless they are submitted from the primary domain.
This solution would let us use the native forms that already exist, but save variables for subdomains.
Comment #23
skirr@drupal.ru commentedsuscribe
Comment #24
mariano.barcia commentedsubscribing
Comment #25
nancydruWhat do you mean by "where the stored variables have a non-trivial effect on behavior"? This user is having trouble with Taxonomy Image, which does use variables, and they are important to the correct operation.
Comment #26
agentrickardThe issue is that Forums use a combination of variables and database records that cannot be managed by either the Domain Conf interface or the Domain Prefix interface.
I do not really understand your question. "This user" who is "this user"???
If you are having an issue, please open a new ticket.
Comment #27
nancydru"This user" is "skizzo" who started this thread. The issue is not mine, but his; I am trying to understand whether Domain could be causing it.
Comment #28
agentrickardThe issue is that Forums are stored as vocabulary terms -- which can be separated using Domain Prefix. However, Containers are stored as site variables, which would have to be handled by Domain Conf.
Separating the two is confusing, and makes the UI impossible to manage. So the answer for now -- unless someone writes a special Domain Forum module -- is as follows:
-- You can separate forums per domain by using Domain Prefix IFF
---- You do not use forum containers
---- Or, you use the same containers for all domains
For most modules, prefixing the database tables or switching the variables is sufficient. Forum is a special case.
This is an old issue, long since forgotten, which explains my confusion. It is still active and seeking a solution. Perhaps skizzo found one.
Comment #29
skizzo commentedNot really. As I have no programming skills I always must "adapt to the environment" and learn the lesson. Here I just decided to stay away from Forum (and anything else that plays around too much with variables) and Domain Prefix. After doing some more testing I now feel that the problem I am having with Taxonomy Image most likely has nothing to do with Domain. Sorry for misleading NancyDru...
Comment #30
scedwar commentedWe're currently testing Advanced Forum on our own site and I wanted to give a use case. I can't see how we could use prefixing to achieve what we want on our site as we don't want the forums to be completely separate. Details below (and apologies if some of the below is basic, but I wanted to ensure I wasn't confused by the forums terminology and this may help others trying to work out the problem).
Background
We have multiple sites on Charity Rallies www.charityrallies.org using the Domain module. We have no table prefixing and we have a different theme for each subsite.
We have Advanced Forum running (for test purposes only) on the site. Domain means of course that the module appears here:
http://www.charityrallies.org/forum and http://mongolia.charityrallies.org/forum and http://oz.charityrallies.org/forum and so on.
Our forums structure is that we have general forums and then rally specific forums. For example, a Mongolia specific forum:
http://mongolia.charityrallies.org/en/forums/mongolia-charity-rally
What I would like to achieve is a complete list of all forums on the main domain at http://www.charityrallies.org/forum
Conveniently the list of Containers at that URL will (eventually) correspond to one Container for each domain on our site. That way each domain has a forum of its own, but visiting the top level allows access to all forums across all sites.
We have configured the Domain node publishing so that any Forum topic (which is a node) is published to every site, so any user will see the Topic listed in the forums on their site. This works well as this lets users on all sites see posts right across the system. If they follow the links, and click on a Forum Topic (a node), Domain Source redirects the user to the domain where the Forum Topic was first published. Nice, especially with a consolidated list of all new topics across all forums!
Our plan was to simply link directly into the forum specific to the site, e.g. the Forums link on the Mongolia site would be to:
http://mongolia.charityrallies.org/en/forums/mongolia-charity-rally
The Problem
1. When browsing through the forums, it is only when you view a Forum Topic (the node) that Domain source can redirect the user to the appropriate domain. If you click on a Forum Container (a site variable) or Forum (a vocabulary) you are not redirected, e.g. clicking on the Mongolia Forum Container whilst you are on the Oz site does not send you to the Mongolia site. Forum Containers and Forums are, after all, not nodes and have no concept of a source domain.
2. If a user posts a forum topic they are given a drop down list of Forum Containers across all sites. Therefore, they could post a Forum Topic to the Oz Rally Forum from the Mongolia site. Not a problem, except the Domain module will see Oz as the source for that forum post, so a user browsing the Mongolia forums will suddenly get redirected off to the Oz site when they read a Mongolia post! Far too confusing.
Possible solutions
1. Forum containers and Forums need to support the domain publishing options, just like nodes do already. When creating a Forum or Container, you choose the source domain and which sites it is published to. In our use case the Containers are the site specific elements, the Forums all reside within a container on one site. Therefore, a way to make Containers site specific only, would probably suffice. Given the complexity of dealing with taxonomy/site variables, is it possible to control this on a path basis? In vaguely analogous way to "Special Page Requests" could we do something to limit the domain that certain URLs can be accessed from, e.g.:
"*/forums/mongolia-charity-rally/* = Domain id 1"
*/forums/oz-rally/* = Domain id 2
2. When posting a Forum Topic (a node), the list of Containers and Forums (which are not nodes) could be restricted to only those available on that domain. I'm thinking of a similar behaviour to Domain menu, and configured in a similar way for each domain manually. This would only work if your domain forum resides only under one container (as in our case). Alternatively, the list could be left to show all Forum Containers, but automatically set the correct domain publishing (and hence the domain source) to match the selected forum (which I think you were describing above?)
Thanks again for any help on this, and either way I hope this post may be useful for others in a similar position.
Comment #31
agentrickardComment #32
scedwar commentedWe're pushing on with this. Pete has been working on a new module that we're going to try and put into CVS called "domain_forum" to achieve objective 1 in the solution above - analogous to 'domain_menu'.
As for item 1 in my list of possible solutions, we still need some thought. The problem really only arises when viewing either /forum (a list of containers) or /forum/forumname (a list of forums separated by the taxonomy). The links to the nodes are fine (thanks to domain) but the links to the forums and any other containers are not. In our site, we only use containers to separate out the forums for each domain so our thinking is to simply have a mapping of containers -> domain ids and then use Advanced Forum to check the container for that forum and rewrite the URL correctly. Not a perfect solution, but ideal for our purposes and a reasonable compromise. My question is this: how should this be implemented? (1) Could we extend custom_url_rewrite_outbound() to rewrite links to containers in the way that nodes are rewritten? For example using some sort of node link pattern analogy? or (2) Should we patch Advanced Forum to use our mapping code to correctly set the base_url from our mappings when generating lists of containers? or (3) something else?
Thanks, Stephen
Comment #33
agentrickard(1) should work. perhaps we need to put a hook in, like we recently did for path aliases in the D6 code.
Comment #34
Skirr commentedSorry for not to be modest, but is there any progress in domain_forum. And what is the best solution to use separated forums?
Looks like prefexing the terms tables is the only choice right now to make visible only right categories and forums on particular domain.
But this makes some trouble with modules that use terms also.
Comment #35
agentrickardI have not done anything in this area. The easiest solution is not to use containers, or to use the same containers across all sites.
Comment #36
scedwar commentedwe're using domain forum on our site at http://www.charityrallies.org/forum
We have one container per domain and we have (temporarily)disabled the overall forums page because the links shown on that page are not currently rewritten for a container, such that you could then navigate to a container on the wrong domain (node links, i.e. forum topics) are properly rewritten. This is a bigger job to fix as it requires digging into forum (or advanced_forum) module to fix the forum view page.
In effect we have 3 forums, one on each domain. It works neatly because domain forum prevents users from incorrectly posting to a forum on a different domain. I'll chase Pete to submit the code into cvs, or at least as a patch here.
Comment #37
pbarnett commentedDue to scedwar's relentless bullying ;-) here's the code that we're using...
It's pretty small, so you'll get the gist of what the code's doing, but it's uncommented and undocumented at present.
Pete.
Comment #38
scedwar commentedI'm such a bully! :-)
The code has a very simple function, analogous to Domain Menu.
At /admin/settings/domain_forum you can choose the top level forums for each domain. This then restricts the choice of forums a Forum Topic can be posted to when adding or editing a Forum Topic.
Stephen
Comment #39
Skirr commentedLooks like i found a person who will make this module. Should we try to create a new project for this module? Hope to get some support now to make everything right. :)
What we are planing for now (our priority):
Features:
1. Forum and containers will be under Domain Access rules
2. All subforum and subcontainers (everything that is inside of a Forum or a Container) will inherit their access permissions until they will be changed by editing or in process of making a new forum/container
3. UI must be the same as in DA or maybe even use DA's UI plus inherits of permissions for included forums/containers/nodes
Examples:
Container1 with permissions to view on all affiliated domains. Forum1 inside of Container1 inherits container1 permissions. Nodes in Forum1 inherit permissions of forum1.
Forum2 inside of Container1, in process of making get permissions to view only on specific domains abc.example.com и xyz.example.com Nodes in forum2 inherit permissions of forum2.
Container2 with permissions to view only on specific domains abc.example.com Forum3 inside of Container2 inside of Container2. Nodes in forum3 inherit permissions of forum3.
Rough plan for making this functional: (i'm not a programmer, i just translate, but hope you'll get the idea and maybe give some advice)
Make a DBtable for taxonomy terms , like a DA has for nodes. Lets call it DomainTerm table (DTtable).
Create db_rewrite_sql hook for terms query, like module taxonomy_access do and filter terms by current domain the same way it works for nodes in DA, but in other DBtable (DTtable).
For assigning terms domain will be needed a terms form hook, that will bind it to domain in DTtable the same way hook for nodes work.
Comment #40
agentrickardThis should be a separate module. (After 6.x.2 is finally stable, I will be splitting the main module into more pieces).
I am not sure that this is all necessary, as my understanding of the problem is simply that Containers are stored as variables, while forums themselves are nodes.
Comment #41
Junro commentedsubscribe :)
Comment #42
pbarnett commentedI've already created a project; I just haven't published anything to it. You're welcome to contribute if it saves creating a new project...
Pete.
Comment #43
Skirr commentedpbarnett i think will contribute. But right now we need to decide how to make it. I'm sure want to get the features i wrote above.
But looks like we're planing more to do term control module (and than its gonna be something in the middle between Taxonomy Access and Domain Access, and we aren't sure, that we want it). When Ken made a good notice, that the deal is in containers, not terms. So right now we are thinking of the right way.
Maybe people need to have the domain control over terms too, who knows. Any ideas?
Comment #44
agentrickardMy only advice is "fix simple use-cases first", then tackle the hard ones if you have to.
Having containers per-domain may be enough.
Comment #45
pbarnett commented@skirr: I'll publish the code we're using as soon as I have the time, and you can take the code and customise it to fit your needs.
@agentrickard: Couldn't agree more...
Pete.
Comment #46
scedwar commented@agentrickard - I agree entirely. Keep it simple.
See my post number 30 for the problem. You can come up with complex access rules but my preference is to keep it simple and simply solve the problem of rewriting links to containers and forums. This might be possible with (1) the Domain forum module to manage the mappings and (2)patches to advanced forum to deal with the rewriting?
Comment #47
Skirr commentedWell, we went the hard way, because wanted complex features. And decided to do a module for the taxonomy in whole. And because of it decided that Domain Taxonomy would be a better name for this module. That why the programmer xanderz is waiting for cvs access to create the project. To try the module we need to wait till the project will be created and i'll post here about it. Anyway i already tested it and looks like this issue is fixed. Sorry not for contributing it to Domain Forum. It's just a different module.
Comment #48
scedwar commentedI'm excited - it sounds like you guys have cracked the taxonomy problem as a whole?! Wow! If so, then domain forum could well be completely redundant if you've supported containers. Yours would be a much more elegant approach - eagerly awaiting the project or if you can post the files here in the interim we'd love to have a look.
thanks, Stephen
Comment #49
Skirr commentedI'm excited too, because eager to hear the community opinions.
Comment #50
xanderz commentedi`am who create this "Domain Taxonomy" (for D6) module and waiting for administration give me access to create this project. Temporary posting module here for testing by community. Instructions are included in README.txt file.
Comment #51
scedwar commentedGood work! Apologies, though, as we're still on D5 and won't have capability to transition to D6 until after the summer. We will try and set up a second dev site for D6 set up soon and get some comments to you, but this means we're not going to be able to review this immediately.
Comment #52
agentrickardDomain Taxonomy has been released. http://drupal.org/project/domain_taxonomy
Domain Forum should be a separate project as well, if it is still needed.
Comment #53
Netbuddy commentedOk, coming on this one late, but im currently having the problem where my forum appears across all sites.
Whats the status on this atm?
I just have 1 site so far, out of 8, that has a forum with 3 containers, and about 20 forums within those. Havent prefixed any tables. Basically, just need the entire forum to appear on 1 site specific site, rather than all of them.
Just wondering what the best approach would be at this point.
Should also mention Domain Forum wont work for D6.
Comment #54
summit commentedWhy do you need domain_forum if domain_taxonomy handles the problem of container?
Greetings, Martijn
Comment #55
Netbuddy commentedSo if I have 2 forum indexes, on 2 differant domains, with totally different containers and forums, how do I go about getting this to work now on Drupal 6.14. Also using advanced forum as well btw. Ive installed the Domain Taxonomy module, do I still need to prefix the forum table, and the various terms tables? Basically I want these 2 forum areas totally unique to each site, all I may want to do in the future is show some statistics on posting for each forum, for each user, on an advanced profile page, possibly using views, a panel page and panes.
Comment #56
Netbuddy commentedIm using the Domain Taxonomy module now, and it has fixed up the problem of forum containers and forums appearing on multiple sites :) Thats a win, but now im finding that forum topics arent showing under their respective forums.
See this post > http://drupal.org/node/509604#comment-2269742
I have no idea why they wont show...
Of course I still need to also fix the problem with URL aliases appending -0, on a multisite install using the same DB, tried prefixing URL alias table, but has problems with sessions...thats another issue...id be happy to sort this topic listing problem out.
UPDATE:
ok, if I disable the Advanced Forum module this problem goes away. So thats the next thing to check out grrr.
Comment #57
Skirr commentedI'm using Domain and Domain Taxonomy and Advanced forum and OG forum.
Topics don't show up only in some cases with OGforum. I'm not a programmer and dont know, is this a conflict only with AdvForum or with DomainTaxonomy too. But Domain Taxonomy dont work with Ogforum for 100%, when forums are create by Ogforum they dont get domain rules :( I do it for them manually.
I dont prefix anything. Just tuned up DTaxonomy.
In all other cases forums and containers work fine.
This is the structure i'm using on 5 subdomains including the domain:
1. Each site have its own containers and forums. Forums in forums. Containers in forums and forums in containers.
2. And there is 2 containers with forums and containers inside, that are "affiliated to all" and are working like one forum for all sites.
And all of this are good working together. Sadly without automatic Ogforums.
I think that Dtaxonomy gives the full flexibility. Just cant think of the way forums could be structured, that Dtax would not handle.
#53 Netbuddy you just need to affilate all the forums and containers to one particular domain. There is a special button for that. Just take the highest level container or forum, affiliate it to needed domain and also choose the source and check the button to inherit this rules by all childs. That all.
Btw think this issue should be in Domain Taxonomy.
Comment #58
Netbuddy commentedHey thx for your help on this one :) Could you let me know know how you have the options for the Taxonomy module setup under the larger Domain Access module? Under these areas, I have these settings:
- Domain taxonomy module behaviors
* Pass as hidden
- Taxonomy search engine optimization:
* Rewrite all URLS to point to a single source
- Vocabulares without domain access rules
* Forums NOT ticked
- Share this vocabulares to all affiliates by default
* Forums NOT ticked
- Parent vocabulares for node types
* Forums selected in Forum Topic dropdticked
- Term link patterns
* Kept this area default to whatever it was on install.
#53 Netbuddy you just need to affilate all the forums and containers to one particular domain. There is a special button for that. Just take the highest level container or forum, affiliate it to needed domain and also choose the source and check the button to inherit this rules by all childs. That all.
^ Did the above for the General container and News & Announcements. Went into both the primary DA domain and the affiliate domain that houses this forum and selected Overall all child terms, Overall child nodes. Set those Containers to the affiliate domain that houses the forum ONLY. Not sure if that is rigt, but still cant get these topics to display under the relevant forum....there has been a post to the issue on the Adv Forum queue, ill chase it up there as well.
Comment #59
Netbuddy commentedHad to install Views...had not done that yet. Instantly solved it.
http://drupal.org/node/633774#comment-2272790
Comment #60
agentrickardClosing. Hopefully for good.