Hi,
I had the same problem when I installed virtual domain extension (ver.
1.1) some days ago. I solved it by this patch.
--- virtual_domain_extension.rb.orig 2007-04-21 21:28:32.000000000 +0900
+++ virtual_domain_extension.rb 2007-04-21 21:37:23.000000000 +0900
@@ -8,7 +8,13 @@
def activate
Page.send :mattr_accessor, :request
require_dependency 'application'
+ SiteController.send :alias_method, :show_page_orig, :show_page
+ SiteController.send :remove_method, :show_page
SiteController.send :include, CacheByDomain
VirtualDomainPage
end
+
+ def deactivate
+ SiteController.send :alias_method, :show_page, :show_page_orig
+ end
end
This removes the method SiteController#show_page before SiteController
includes CacheByDomain, because Ruby's Mix-in is realised by inserting
a module into class inheritance relation.(SiteController >
CacheByDomain > ApplicationController > ...) I think @hostname is
always nil when SiteController#show_page is not removed.(because
CacheByDomain#show_page is not called but original
SiteController#show_page, and Page.request is setted by
CacheByDomain#show_page) This patch works fine in my environment.
-----
Keita Yamaguchi
2007/4/21, Brian Gernhardt <[EMAIL PROTECTED]>:
>
> On Apr 20, 2007, at 4:55 PM, Mathieu Lue wrote:
>
> > I'm having trouble using virtual domains 0.6. I believe that is the
> > version that has been updated for the radiant .6 candidate. I am
> > able to
> > specify the slug of a default page that I want any requests
> > forwarded to
> > the radiant installation to go to. However nothing else seems to work.
> > Upon inserting a debugging block of code in the installation and
> > running
> > all sorts of inspections on the "@hostname ||=
> > Page.request.respond_to?(:host) ? Page.request.host : nil" it always
> > returns nil. @hostname is always nil
>
> Is Page.request set to anything? If not, it means that the
> CacheByDomain module isn't being loaded properly, or the show_page
> method is being overridden by something else.
>
> If it is, then the request doesn't have any host information which is
> just odd.
>
> ~~ Brian
>
> _______________________________________________
> Radiant mailing list
> Post: [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant