Support » Plugin: HyperDB » Multi Site Bug Fix

  • Sharing in case someone else has the same issues.

    Was experiencing 404 errors on all pages and inability to login after installing the plugin.

    Had To make the following edits to make the plugin work on a site i am working on.

    added to line 210 of db.php

    
    		$id = get_current_blog_id();		
    		$this->base_prefix = $GLOBALS['table_prefix'];
    		$this->prefix = $this->base_prefix;
    		
    		if($id > 1) $this->base_prefix = $this->prefix.$id."_";
    
    		foreach($this->tables as $table){
    			$this->$table = $this->prefix.$table;
    		}
    
    		foreach($this->global_tables as $table){
    			$this->$table = $this->base_prefix.$table;
    		}
    
    		foreach($this->ms_global_tables as $table){
    			$this->$table = $this->base_prefix.$table;
    		}
    

    Not sure if this affects normal installs or if its just me setup.

    I tried removing all other plugins and using the default theme none of which helped so decided to modify the plugin.

  • The topic ‘Multi Site Bug Fix’ is closed to new replies.