Yes I am using Styles 'n Scripts,

and yes, I did notice most of this was fixed in 0.6.5, but IIRC, there
were two problems I had to address for the relative link issue. 

First, with the old-fashioned script and style linking, each had to be
set explicitly in the <link> tag.  That is, I had to do <link
href="/radiantroot/..."> instead of just href="...".  That wasn't a big
deal, because it was in layouts which I only had to think about once
(but then would have had to remind myself to change before deploying and
moving to the url root).  I'd hardly call this an issue with radiant. 
It's just how the html is supposed to work, right?

Second, the problem was a general gotcha with extensions.  Any extension
based on a path relative to / wouldn't work.  This included
styles-n-scripts, mailer, and, I think calendar.  I dug around for a
definition of a variable that would fix that, but didn't have much luck,
so decided to just go with the .htaccess hack.  It works well enough for
testing, and I definitely 'get' the whole thing about radiant not being
defined for sub-urls.

It might be interesting to see how well the root url variable definition
would work, but it looks like some of the extensions just assume it's
"/" and hard-code that way (based on my shaky RoR reading), so that
could limit the mileage a bit.

By the way, great work on both Radiant and the SnS extension.  Thank you.


Chris Parrish wrote:
> Danny,
> Are you using my new Styles 'n Scripts extension.  If so, I'm quite
> sure it isn't doing anything to accommodate a different root than
> plain old '/' and will happily break things for you.
> I would be happy to change this (for your need, to play nice with the
> multi_site extension, etc).
> Sean (or anyone), is there a preferred way to do this so that I honor
> some Radiant::Config (or some such setting)?
> -Chris
> Sean Cribbs wrote:
>> The relative path issue was resolved as best we could in 0.6.5, that
>> is, links in the admin UI will be generated correctly and links and
>> URLs generated from the standard Radius tags will be correct.  Are
>> there links otherwise that aren't working for you?
>> Sean
>> danny q. wrote:
>>> I always seem to figure these things out /after/ I post a big long
>>> question to the public.  But I did manage to fix it, and I'll write how
>>> for future reference.
>>> I'd noticed that there are a lot of problems when running on a
>>> subdirectory (e.g.  Setting
>>> DocumentRoot in .htaccess partially addresses this, but still leads to
>>> quite a few 404s, especially in generated links to stylesheets and
>>> scripts, and the mailer.  This is because radiant or extensions will
>>> generate links to, for example,
>>> when they should be linking to
>>> I have a partial solution that uses a few .htaccess lines.  You drop
>>> the
>>> following in an .htaccess directory above the radiant root (the
>>> public_html for
>>> RewriteEngine on
>>> # if the link originates from the radiant directory,
>>> RewriteCond %{HTTP_REFERER} ^.*somesite\.com.*
>>> # rewrite the request, put a '/radiantroot/' before it
>>> RewriteRule (.*)$$1
>>> You can generalize or specify this to taste, but the above code is what
>>> worked for me.  It probably isn't recommended for public deployment,
>>> but
>>> will work for testing on a subdirectory of a root domain.  Anyone who
>>> has referers turned off (a feature when 'private browsing' is turned
>>> on)
>>> will still not catch the links properly.  Also, make sure the .htaccess
>>> has permissions set to 755.
>>> If anyone thinks this is worth it, maybe we could drop this hint in the
>>> wiki somewhere, or some other documentation.
>>> thanks,
>>> --danny
>>> danny q. wrote:
>>>> Hi Radiant list,
>>>> I've been getting ready to migrate my current site to radiant, been
>>>> running tests on a subdomain.  The last step before I switch over
>>>> is to
>>>> get a mailer contact form up and running, and I just can't seem to
>>>> do it.
>>>> I know that there've been a lot of updates in the past few weeks,
>>>> and I
>>>> think I can list my known unknowns as follows:
>>>> 1.  Which mailer extension should I use for 0.6.7?  There's the svn
>>>> listed in the wiki, and there's another one in
>>>> github. Are either compatible and working with the current
>>>> radiant?  I've tried
>>>> both with no luck.
>>>> 2.  Assuming one of them is compatible, can anyone give me some
>>>> updates
>>>> to the documentation?  I suspect the non-workingness may be more of a
>>>> pebkac phenomenon, but I've spent a good amount of time hacking
>>>> around,
>>>> and can hardly even get a worthwhile error message (even though I
>>>> enabled them in environment.rb).
>>>> 3.  What changes should I have to make to get this working in a
>>>> subdirectory of the URL root.  The radiant root url is on something
>>>> like
>>>>, which has caused me a little trouble
>>>> before,
>>>> and might be the source of all my problems here.  Is there a site root
>>>> variable I should change or define, or perhaps an .htaccess line I
>>>> should drop somewhere?
>>>> I'd really appreciate some pointers on this.  I've been really
>>>> impressed
>>>> with the community involvement and active development around here, and
>>>> it's a big part of why I'm switching to Radiant.
>>>> Thanks,
>>>> --danny
>>>> _______________________________________________
>>>> Radiant mailing list
>>>> Post:
>>>> Search:
>>>> Site:
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:
>>> Search:
>>> Site:
>> _______________________________________________
>> Radiant mailing list
>> Post:
>> Search:
>> Site:
> _______________________________________________
> Radiant mailing list
> Post:
> Search:
> Site:

Radiant mailing list

Reply via email to