Hi!

Have run into a problem (blocks do not save on sub-domain) when pre-fixing tables.

Attached are 2 screenshots to show:

Prefix block tables are correctly configured on sub-domain
Block tables exist correctly in phpmyadmin as main_domain_3_blocks etc

Table 'lilifilm.domain_3_blocks'; doesn't exist query: SELECT DISTINCT b.* FROM domain_3_blocks b LEFT JOIN domain_3_blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = endless_news; AND b.status = 1 AND (r.rid IN (2,6) OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in /home/public_html/modules/block/block.module on line 460.

So what I'm seeing is that the prefix of 'lilifilm.domain_3_blocks' should be 'lilifilm.main_domain_3_blocks

Please would you be so kind to point me in the right direction.

Note: Single signon also installed, but don't think that is related

Comments

agentrickard’s picture

What is $db_prefix set to in settings.php? Is it set _before_ the domain access include line?

I would also use Domain Blocks module over this approach, personally.

liliplanet’s picture

Thank you for your super-fast response :) Appreciate the suggestion of domain-blocks, but will be using custom_menu and contact page as well ..

$db_prefix = array(
     'default'        => 'main_',
     'authmap'        => 'controller_database',
     'sessions'       => 'controller_database',
     'users'          => 'controller_database',
   );

sorry missed your other question .. yes settings.php is right at the bottom of the page:

$conf['session_inc'] = 'sites/all/modules/sso/session.singlesignon.inc';
include './sites/all/modules/domain/settings.inc';
liliplanet’s picture

domain_blocks looks fabulous, and should heed your suggestion :)

what would i do in place of giving per domain a contact page (form) please?

agentrickard’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.18 KB

You could prefix that table by hand, calculating the active domain.

But I wonder why this is failing. I don't actually use this module, so it needs investigating.

I suspect the problem is the table creation sequence is wrong. See domain_prefix_form_submit.

liliplanet’s picture

unfortunately no improvement after the patch (:

agentrickard, i will definitely consider the better-block for domains ... just a little lost on how to clone the contact form per domain.

thank you for your exceptional support and this beautiful module ..

agentrickard’s picture

I answered that question in #4. Please consider your tone.

I don't really support this module anymore. The problem is that $db_prefix isn't getting handled properly on table creation.

liliplanet’s picture

thank you agentrickard, sorry don't understand 'please consider your tone' .. thought i was being very appreciate of your fabulous module :)

as mentioned the patch does not work, so will try out your suggestion with better-block, the question was that if I could not make db-prefix work, how would I clone the contact form per domain? Do we have another option perhaps with the domain.module if not using the prefix ?

liliplanet’s picture

Found the solution by renaming the database tables created by the prefix module in phpmyadmin without the mydatabase_ prefix

in other words for contact form is only = domain_2_contact

Thank you agentrickard for your amazing module :)

liliplanet’s picture

Status: Needs review » Closed (fixed)
agentrickard’s picture

Status: Closed (fixed) » Needs work

Not really fixed.

dqd’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)