Manually set the location of the configuration list

Home Forums Classic DFFS Manually set the location of the configuration list

Viewing 6 reply threads
  • Author
    Posts
    • #7340
      Michal Riha
      Participant

        I have this line in DFFS_frontend_CEWP.html and DFFS_backend_CEWP.html:
        var dffs_configListBaseUrl = “/PWA“;
        (PWA is site collection)
        create subweb https://friendlyurl/PWA/template
        and configure DFFS for list name riskregister
        Than configuration record is created in
        https://friendlyurl/PWA/Lists/SPJSDynamicFormsForSharePoint
        with title: /lists/riskregister/newform.aspx

        I expected that when save this subsite as template and create new site from this template (as a subsite of /PWA – same level as template):
        https://friendlyurl/PWA/NewSite
        it will connect to the same configuration entry as template (and actually all new subsites under /PWA will use the same configuration entry)
        but a new conf. entry is created:
        /pwa/NewSite/lists/riskregister/newform.aspx

        How to setup it? Is it possible to ensure that for all subsites under /PWA I will have one configuration entry in SPJSDynamicFormsForSharePoint list?

        Thanks

        Michal

      • #7357
        Alexander Bautz
        Keymaster

          Hi,
          I have made a test like this:

          Used a subsite under /DFFS/DFFSTemplate to store all script files in a library, and to hold the DFFS_backend web part page.

          Then added a site to use as template here: /DFFS/DFFSTemplate/Template

          This site is set up with DFFS, and it stores its configuration here “/DFFS/DFFSTemplate/Lists/SPJSDynamicFormsForSharePoint” using this variable in the “DFFS_backend_CEWP.html”:

          var dffs_configListBaseUrl = "/DFFS/DFFSTemplate";

          In the “DFFS_frontend_CEWP.html” I have these variables:

          var dffs_configListBaseUrl = "/DFFS/DFFSTemplate";
          var spjs_dffs_backend = "/DFFS/DFFSTemplate/SitePages/DFFSBackend.aspx";

          This setup will store the configuration for both the “master” subsite, and the clones created by this template in the same configuration list, and uses this identifier (no subsite path):

          /lists/MyList/newform.aspx

          Can you verify that this is the same setup you have? – could it be that you have not “centralized” the DFFS_backend?

          Hope this helps you sort it out.

          Alexander

        • #7368
          Michal Riha
          Participant

            Hi Alexander,

            thanks for reply.

            It seems, that configuration you described is quite similar. But do not work for me. Maybe I missed something.

            All the scripts are located here: /PWA/scripts (PWA=site collection / scripts=document library)
            Under PWA is created subsite “template”: /PWA/template
            DFFS configuration is stored here: /PWA/Lists/SPJSDynamicFormsForSharePoint

            “DFFS_backend_CEWP.html”:

            var dffs_configListBaseUrl = "/PWA";

            In the “DFFS_frontend_CEWP.html” I have these variables:

            var dffs_configListBaseUrl = "/PWA";
            var spjs_dffs_backend = "/PWA/scripts/DFFS/DFFS_backend.aspx";

            (scripts=document library, DFFS=folder)

            This setup store configuration for “template” subsite as:
            /lists/riskregister/newform.aspx

            But for other sites – at the same url level (/PWA/NewSite):
            /PWA/NewSite/lists/riskregister/newform.aspx

            I use different names than you, but location and configuration (as I hope) is basically the same.

            What is wrong?

            Thanks

            Michal

            • This reply was modified 9 years, 8 months ago by Michal Riha.
            • This reply was modified 9 years, 8 months ago by Michal Riha.
            • This reply was modified 9 years, 8 months ago by Michal Riha.
          • #7372
            Alexander Bautz
            Keymaster

              Can you post the URL from the editing of the configuration of the “NewSite” (from the DFFS backend)?

              You can change the domain name of your site to “contoso.com” when posting the URL.

              Alexander

            • #7378
              Michal Riha
              Participant

                https://contoso.com/PWA/scripts/DFFS/DFFS_backend.aspx?targetList={0e30b85c-b447-4a0f-a229-9e284a36fd48}&targetListBaseUrl=/PWA/Training – BSI2 – WE&formId=/pwa/training – bsi2 – we/lists/riskregister/newform.aspx&formType=1&Source=/PWA/Training%20-%20BSI2%20-%20WE/Lists/riskregister/NewForm.aspx

                site url is: /PWA/Training – BSI2 – WE

                Michal

              • #7379
                Alexander Bautz
                Keymaster

                  Good news: I have recreated the issue. It was caused by the spaces and the hyphen in the URL as this was not properly handled in the script.

                  I will post an update before the weekend to take care of this issue, but you might be able to use this workaround. Add the following snippet BELOW the scrip tag that refers dffs_frontend_min.js:

                  spjs.dffs.data.pageId = decodeURI(unescape(location.pathname).replace(L_Menu_BaseUrl,'')).toLowerCase();

                  Thank you for helping to sort out this bug.

                  Best regards,
                  Alexander

                • #7380
                  Michal Riha
                  Participant

                    Hi Alexander,

                    thanks for good news!
                    Workaround works!

                    Thanks and best regards

                    Michal

                Viewing 6 reply threads
                • You must be logged in to reply to this topic.