Jump to:

10845 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Can not add a subsites virtual page

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 297 Views
  • Rupert
    Avatar
    Community Member
    5 Posts

    Can not add a subsites virtual page Link to this post

    Hi,

    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.

    Thanks,
    Rupert

  • Rupert
    Avatar
    Community Member
    5 Posts

    Re: Can not add a subsites virtual page Link to this post

    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"
    "Content"
    are editable.

    So what is the real solution?

  • Rupert
    Avatar
    Community Member
    5 Posts

    Re: Can not add a subsites virtual page Link to this post

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

                subsiteSel.onchange = (function() {
                   this.createTreeNode(true);
                   this.ajaxGetTree((function(response) {
                      this.newTreeReady(response, true);
                      this.updateTreeLabel();
                   }).bind(this));
                }).bind(this);

    Most of these function calls do not exist??

    297 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.