[support] SOLVED !!!!! (Re: multisite: node's data is not visibile but exist)

Michel Morelli michel at ziobuddalabs.it
Mon Jun 29 14:51:08 UTC 2009


I have solved this problem in this way:

in settings.php file create a new $db_url[] entry:

$db_url['shared'] = 
'mysqli://username:password@localhost/databasename_of_shared_db_container';

Next create a module (or attach to a existent module) and in the 
.install file add this function:

<?php

function MYMODULE_schema() {
  global $db_url;
  global $db_prefix;

  $db_old = $db_prefix;

  $schema = array();
  if (isset($db_url['shared'])) {
        db_set_active('shared');
        if (function_exists('content_schema')) {
                $db_prefix['content_node_field'] = '';
                $db_prefix['content_node_field_instance'] = '';
                $schema = content_schema();
        }
        db_set_active('default');
  }
  //dpm($schema);
  $db_prefix = $db_old;
  return $schema;
}


It works for me. For the moment at least :D

M.

-- 
Michel 'ZioBudda' Morelli                       michel at ziobuddalabs.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net                         ICQ: 58351764  
http://www.ziobuddalabs.it                      Skype: zio_budda
http://www.ziodrupal.net       			MSN: michel at ziobuddalabs.it                   
						JABBER: michel at ziobuddalabs.it



More information about the support mailing list