Domain prefix (updating tables) page not updating when submitting page post.
| Project: | Domain Access |
| Version: | 6.x-2.0-rc6 |
| Component: | - Domain Prefix |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | domain access, domain prefix, form post. |
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

#1
Once 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
#2
Thanks 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
#3
Hm. Using MySQL?
Are you using a global $db_prefix?
#4
Sorry, 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
#5
Look 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.
#6
Hi - 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
#7
Well, that means the problem is here:
if (!empty($form_state['values']['domain_arguments']['user_submitted'])) {$msg = FALSE;
// Should we create tables for user domains?
$create = variable_get('domain_user_prefixing', 0);
}
And for some reason, the IF is evaluating to TRUE, which unsets the $msg output.
Any idea why?
#8
Hi 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
#9
I 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
#10
Here is a patch that may help.
#11
Hi, 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
#12
PLEASE 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
#13
It looks like I committed this and forgot to mark the issue.
#14
This can't be ported as-is, since the D5 and D6 versions are very different.
#15
Automatically closed -- issue fixed for 2 weeks with no activity.