# Sitemap.js prevents use of /admin in subdirectory (was Re: H

**URL:** <https://www.ruby-forum.com/t/sitemap-js-prevents-use-of-admin-in-subdirectory-was-re-h/105780>\
**Category:** Radiant CMS\
**Created:** [June 2, 2007, 5:49pm UTC](https://www.ruby-forum.com/t/sitemap-js-prevents-use-of-admin-in-subdirectory-was-re-h/105780 "2007-06-02T17:49:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earl\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3be4f8/32.png) [@Earl\_C](https://www.ruby-forum.com/u/Earl_C)\
**Post date:** [June 2, 2007, 5:49pm UTC](https://www.ruby-forum.com/t/sitemap-js-prevents-use-of-admin-in-subdirectory-was-re-h/105780/1 "2007-06-02T17:49:09Z")

</div>

Earl C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:  
There is a patch for Apache to add ProxyAddXHeaders:

[http://mail-archives.apache.org/mod\_mbox/httpd-dev/200702.mbox/browser](http://mail-archives.apache.org/mod_mbox/httpd-dev/200702.mbox/browser)

Setting this option Off causes Apache to refrain from inserting the  
HTTP\_X\_\* headers making the proxying action transparent.  
After applying this, I was stumped for a while when trying to use /admin  
to edit the site. Things appear to work properly except that clicking on  
the page expander (the + to see the child pages) would result in file  
not found /admin/ui/pages/children/…

I finally found this in public/javascripts/sitemap.js where:

```
new Ajax.Updater(
  row,
  '/admin/ui/pages/children/' + id + '/' + level,

```

assumes the script is in the toplevel directory. I couldn’t think of any  
way of fixing this without modifying the file. My fix was to make this  
path relative:

```
new Ajax.Updater(
   row,
   '../admin/ui/pages/children/' + id + '/' + level,

```

I also see document.cookie saves the path=/admin, but I can’t see this  
used anywhere.

* * *

Building a website is a piece of cake.  
Yahoo! Small Business gives you all the tools to get online.

---

<div class="post-metadata">

**Author:** ![Earl\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3be4f8/32.png) [@Earl\_C](https://www.ruby-forum.com/u/Earl_C)\
**Post date:** [June 2, 2007, 5:54pm UTC](https://www.ruby-forum.com/t/sitemap-js-prevents-use-of-admin-in-subdirectory-was-re-h/105780/2 "2007-06-02T17:54:10Z")

</div>

Earl,

Could you submit a patch for that to the Trac?

Sean

---

<div class="post-metadata">

**Author:** ![Earl\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3be4f8/32.png) [@Earl\_C](https://www.ruby-forum.com/u/Earl_C)\
**Post date:** [June 5, 2007, 12:24am UTC](https://www.ruby-forum.com/t/sitemap-js-prevents-use-of-admin-in-subdirectory-was-re-h/105780/3 "2007-06-05T00:24:13Z")

</div>

Sean C. wrote:

> Could you submit a patch for that to the Trac?

Submitted as [http://dev.radiantcms.org/radiant/ticket/509](http://dev.radiantcms.org/radiant/ticket/509)

Earl

---

<div class="post-metadata">

**Author:** ![Earl\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3be4f8/32.png) [@Earl\_C](https://www.ruby-forum.com/u/Earl_C)\
**Post date:** [June 12, 2007, 2:36am UTC](https://www.ruby-forum.com/t/sitemap-js-prevents-use-of-admin-in-subdirectory-was-re-h/105780/4 "2007-06-12T02:36:07Z")

</div>

Earl wrote:

> Sean C. wrote:
> 
> > Could you submit a patch for that to the Trac?
> 
> Is there a page describing the pre-requisites and actions for doing  
> so?

Yes:

[http://dev.radiantcms.org/radiant/wiki#Contributions](http://dev.radiantcms.org/radiant/wiki#Contributions)

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![Earl\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3be4f8/32.png) [@Earl\_C](https://www.ruby-forum.com/u/Earl_C)\
**Post date:** [June 4, 2007, 12:10am UTC](https://www.ruby-forum.com/t/sitemap-js-prevents-use-of-admin-in-subdirectory-was-re-h/105780/5 "2007-06-04T00:10:13Z")

</div>

Sean C. wrote:

> Could you submit a patch for that to the Trac?

Is there a page describing the pre-requisites and actions for doing  
so?

Earl
