Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Can not add a subsites virtual page

Go to End

3 Posts   551 Views


Community Member, 10 Posts

18 June 2013 at 7:52pm


I am using Subsites-master-1.0-beta1 (with SilverStripe CMS v3.0.5). I can add a virtual page, but not a subsites virtual page.
I can choose a subsite, but then when I try to choose a page to link to, I get the following error:

ReferenceError: $$ is not defined
[Break On This Error]
var subsiteSel = $$('#CopyContentFromID_SubsiteID select')[0];

When the mouse hovers over the "choose a page to link to" drop down box, all I see is a link to #

Any clues to where the problem may lie, would be greatly appreciated.



Community Member, 10 Posts

28 June 2013 at 6:30am

Ok, I am getting closer to a solution, but I need help.

My problem is with the subsites module. In particular the javascript SubsitesTreeDropdownField.js
In this file there is the line:

var subsiteSel = $$('#CopyContentFromID_SubsiteID select')[0];

Now what is this $$ doing?
My javascript does not understand it. If I replace the line with:

var subsiteSel = $('#CopyContentFromID_SubsiteID select')[0];

Then "Choose a page to link to" works. But none of the
"Page name"
"Navigation label"
are editable.

So what is the real solution?


Community Member, 10 Posts

28 June 2013 at 10:24am

Further into the code of SubsitesTreeDropdownField.js
What is going on here:

subsiteSel.onchange = (function() {
this.ajaxGetTree((function(response) {
this.newTreeReady(response, true);

Most of these function calls do not exist??