Hello, I have a problem with Domain Prefixing:
1. Installed fresh copy of Drupal 6.10
2. Installed Doman Access 6.x-2.0-rc6
3. Enabled Domain Access with Domain Prefix
4. In Table Prefixing section, I have defined ‘forum’ to prefix as ‘copy’
5. Created 2 test domains.
Once doing this, to test updating a domain, I try to edit the domain (via 'domain list' and then 'table') and set ‘copy’ back to ‘ignore’. When I submit the form with the ‘Update domain tables’ button, the page is returned WITHOUT making the change. So instead of the bullet reading ‘ignore’ it is stuck at ‘copy’. There is no green confirmation text either to show that the operation was successful.
To replicate, I have tested this on a WAMP system (local) and this works fine. It is on my live ISP that I am having trouble. Everything else on the system is working great :)
Thanks for your help!
Tim
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | domain_prefix.admin_.inc_.test | 18.67 KB | Tim Jones Toronto |
| #10 | 424830-domain-prefix-table.patch | 1.11 KB | agentrickard |
Comments
Comment #1
agentrickardOnce a table has been copied, it stays that way until you Drop it. This is a UI bug, however.
Note that forum prefixing may not work as expected, since forum containers are stored as variables. See #214181: Forums separated by domain
Comment #2
Tim Jones Toronto commentedThanks agentrickard. I meant to add the following example:
If I select the radio button to 'drop' the table, hit "Update tables button", the page refreshes, and the radio button is still set as 'copy'. There is no green status text saying "domain_2_forum table dropped". In other words, whatever I try to update on that page, nothing is UPDATED on POST (I have tested many permutations of updating/changing/dropping other tables on this form etc.).
If I look in the domain_prefix table, the values are not being updated etc. I am therefore stuck with domains unable to be updated/dropped.
Thanks for looking into this,
Tim
Comment #3
agentrickardHm. Using MySQL?
Are you using a global $db_prefix?
Comment #4
Tim Jones Toronto commentedSorry, yes, running MySQL 5.
In settings.php I have left the line as default: $db_prefix = '';
On the system that works fine (WAMP), this line is set identical too.
As a suggestion, is there a PHP line I could temporarily add to the Domain Prefix module code to output the POST data and check that the data is being posted over ready for processing? e.g. If the configuration data is being passed over, I can try and debug where it is getting lost!
It seems the tables page simply refreshes, but doesnt do any updating (odd sounding I know!). I have about 50 other modules being tested concurrently where everything else is working fine from testing.
Cheers again,
Tim
Comment #5
agentrickardLook at the function
domain_prefix_form_submit()in domain_prefix.admin.inc.Perhaps this is related to the 'user submitted' bug? #359037: "user_submitted" flag is set to TRUE even though it was never set.
Comment #6
Tim Jones Toronto commentedHi - looked at your code. I am not using the Domain User Module and so don’t have domain_user_prefixing table. So if I comment out the following line (hack!):
# $create = variable_get('domain_user_prefixing', 0);
which is in domain_prefix.admin.inc, it executes the correct section of your code as the $create variable is left at TRUE. This works now and it deleted a dropped table :)
However (!), I don’t get any page confirmation that it has dopped my table or updated anything (as expected)? It DOES update the relevant table (e.g. drop) in the database however.
Nearly working now, thanks :)
Tim
Comment #7
agentrickardWell, that means the problem is here:
And for some reason, the IF is evaluating to TRUE, which unsets the $msg output.
Any idea why?
Comment #8
Tim Jones Toronto commentedHi agentrickard,
The error seems to be as I suspected, the form POST. It appears that the $form_state is returning empty.
This might be a red herring, but I found another post having unexpected results with $form_state: http://drupal.org/node/409344
So far I haven’t found anything else yet.
If anyone reading this support/subscription has experience (or knows anyone) in form posting PHP coding, could you help us out here?
Thanks a lot!
Tim
Comment #9
agentrickardI am not experiencing the same problems that you are. Do you have any modules altering the form in any way?
And what version of PHP? I am testing on 5.2.5
Comment #10
agentrickardHere is a patch that may help.
Comment #11
Tim Jones Toronto commentedHi, sorry for delay.
I have applied the patch and the web page doesn't open when I click 'Table prefixing'. What happens is the web page keeps trying to load i.e. page status bar: "waiting.... etc" and finally time-outs.
Could you double check my patched file to make sure I am working off a correct patched include file?
Cheers,
Tim
Comment #12
Tim Jones Toronto commentedPLEASE IGNORE #11
Sorry, rushing here... I have tested the patch you gave and it works fine so far: Tables copy and drop.
Thanks for your help.
Tim
Comment #13
agentrickardIt looks like I committed this and forgot to mark the issue.
Comment #14
agentrickardThis can't be ported as-is, since the D5 and D6 versions are very different.