# Multi\_site extension and 0.6.7

**URL:** <https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050>\
**Category:** Radiant CMS\
**Created:** [May 19, 2008, 8:21pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050 "2008-05-19T20:21:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [May 19, 2008, 8:21pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050/1 "2008-05-19T20:21:50Z")

</div>

I realize that this does not yet work, but I thought I would give it a  
try. Unfortunately, I am stumped. There were a few errors with the  
clear\_cache method in the page\_controller, which I think I got. Now I  
am getting an error whenever I try to login in… I am pretty sure it  
is in the application controller, but not really sure what it might  
be. Anyone else try this. I really like this extension, and have whole  
“families” of websites based on it

The error is:

Showing vendor/radiant/app/views/admin/page/index.html.haml where line

# raised:

wrong number of arguments (1 for 0)  
Extracted source (around line #):

Any help appreciated.

Keith

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [May 22, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050/2 "2008-05-22T16:10:40Z")

</div>

I´ve seen the haml plugin is in core and in the extension! removed the  
one in the extension and then the error did not show up:

\vendor\extensions\multi\_site\vendor\plugins\haml

Patxi

Keith B. schrieb:

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [May 22, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050/3 "2008-05-22T16:50:09Z")

</div>

Hi,

could someone explain me how to config the multi\_site extension?

* * *

I would like to organize 2 domains for example:

[http://www.site1.com](http://www.site1.com)  
[http://www.site2.com](http://www.site2.com)

SITES config:

Name: Site1  
Domain pattern???  
Base domain name: [http://www.site1.com](http://www.site1.com)  
Hompage ID: 1

## Name: Site2 Domain pattern??? Base domain name: [http://www.site2.com](http://www.site2.com) Hompage ID: …

Is the base domain name correct?  
For what is the domain pattern?  
Can I test this behavior with localhost:3000 ?

Thanks for help,  
Patxi

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [May 22, 2008, 4:51pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050/4 "2008-05-22T16:51:21Z")

</div>

Name: Site1  
Domain pattern: site1  
Base domain name: [http://www.site1.com](http://www.site1.com)  
Hompage ID: 1

Name: Site2  
Domain pattern: site2  
Base domain name: [http://www.site2.com](http://www.site2.com)  
Hompage ID: (let this figure it out)

That should do it.

On Thu, May 22, 2008 at 10:48 AM, Patxi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## SITES config:
> 
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–  
\m/^.^\m/  
“Some scientists claim that hydrogen,  
because it is so plentiful, is the basic building block of the universe.  
I dispute that.  
I say that there is more stupidity than hydrogen,  
and that is the basic building block of the universe.”  
-Frank Zappa

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [May 22, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050/5 "2008-05-22T17:22:43Z")

</div>

Hi Keith,

what have you changed to get it running?  
I have changed ‘clear\_cache’ to ‘clear\_model\_cache’ 2 times in  
\vendor\extensions\multi\_site\lib\multi\_site\page\_controller\_extensions.rb

Otherwise the server does not start.

- Have you done the same?
- Is this correct?

I still get some errors in the admin control if I want to change “slugs”  
…  
I couldn´t test it on localhost. Is this possible?

Thanks,  
Patxi

Keith B. schrieb:

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [May 22, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050/6 "2008-05-22T17:12:08Z")

</div>

Wonderful!

I haven’t tested it out completely, but I can log in again. Thanks,  
very good idea… I should have thought about that.

Keith

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [May 22, 2008, 6:27pm UTC](https://www.ruby-forum.com/t/multi-site-extension-and-0-6-7/138050/7 "2008-05-22T18:27:44Z")

</div>

Hi Patxi,

just comment the whole block at the top of module Multisite out. It is  
not needed anymore, as the made cache clear itself with every save.

Like this:

def self.included(base)  
base.class\_eval {  
alias\_method\_chain :index, :root  
alias\_method\_chain :clear\_model\_cache, :site  
alias\_method\_chain :continue\_url, :site  
# %w{remove clear\_cache}.each do |m|  
# alias\_method\_chain m.to\_sym, :back  
# end  
}  
end

Worked for me. I will try to fork it on github asap.

Keith
