SyntaxError: Unexpected token ‘o’, “none” is not valid JSON

Home › Forums › Classic DFFS › SyntaxError: Unexpected token ‘o’, “none” is not valid JSON

Viewing 5 reply threads
  • Author
    Posts
    • #39675
      Josef Wainz
      Participant

        As of today we started receiving this error message in a popup messagebox when trying to view or add a list item with DFFS forms:

        SyntaxError: Unexpected token 'o', "none" is not valid JSON

        After 15 or 30 seconds the popup disappears and we see:

        This took forever!
        Try refreshing the page or contact an administrator.

        Any ideas on how to troubleshoot this, the system is non-functional as we cannot see item or add items to the list?

      • #39677
        Alexander Bautz
        Keymaster

          Hi,
          I have had many users of old JSLink installations reach out in the last weeks. What Microsoft did to break it was to remove the value in the hidden field property “Direction” – this was where DFFS stored the JSLink config on the DFFS loader field.

          The recommended fix is to update to a later version of DFFS and user the standard installation method (describe here: https://spjsblog.com/dffs/dffs-installation-manual/#Upgrading_from_a_previous_version_of_v4x)

          It will not fix the document set functionality though – since the “New document set” page cannot be modified to add the classic DFFS CEWP – the JSLink installation method loaded it more or less using a trojan horse…

          The JSLink installation method was deprecated almost 10 years ago and I won’t release an official patch, but you can fix it yourself if you like.

          The fix (if you want to patch the JSLink functionality and not update to the recommended installer) is to open the files setup.html and DFFS_JSLink, search for “Direction” and replace with “Description”. When this is done you must use the setup.html file to “reinstall” the config on the loader-field.

          Hope you are able to figure it out.

          Regards,
          Alexander

        • #39680
          Josef Wainz
          Participant

            Thank you Alexander. Would you please point me to some instructions on the [“reinstall” the config on the loader-field] step in your response?

          • #39681
            Josef Wainz
            Participant

              So I updated both files, replacing

              -Direction=” with Description=” in setup.html
              -a.fieldSchema.Direction with a.fieldSchema.Description in DFFS_JSLink.js

              When I run setup.html I get:

              Some content didn't load. A script didn't run correctly on this page. Some content may be missing or not work as expected. 
              
              Uncaught ReferenceError: ExecuteOrDelayUntilScriptLoaded is not defined (about:srcdoc:679:2)

              Any ideas?

            • #39682
              Alexander Bautz
              Keymaster

                As mentioned the recommended installation method changed 10 years ago – the JSLink functionality is also deprecated from Microsoft back in 2016 so it could break permanently without further notice.

                I suspect that the error occurs because you tried to open the html page directly – it must be loaded in the “Content link” functionality of a Content Editor Web Part – in a classic web part page.

                The jslink installation manual here: https://files.spjsworks.com/?dir=files%2FDynamicFormsForSharePoint%2Fv4%2FDFFS_JSLink%2F

                Alexander

              • #39686
                Josef Wainz
                Participant

                  Thanks Alexander, it is working again.

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