JSON Error Posting Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rhens
    Senior Member
    • Sep 2012
    • 197

    JSON Error Posting Table

    Version: vBulletin 5.1.2 PL 3

    Error:Error while saving content: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

    Action: Attempting to post a table containing HTML anchored URL links and HTML image links as a new thread.

    What is causing this error?
  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4021
    • 5.7.X

    #2
    Turn on debug mode and try again. Then take a look at the ajax response. It should contain the detailed php error stack trace.

    Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

    Comment

    • rhens
      Senior Member
      • Sep 2012
      • 197

      #3
      Originally posted by Glenn Vergara
      Turn on debug mode and try again. Then take a look at the ajax response. It should contain the detailed php error stack trace.
      This would be the logical course of action if turning on debug mode didn't result in a "cannot read config.php" error. However, changing the presentation config.php file from:

      // This setting enables debug mode, it should NEVER be used on a live site
      $config['debug'] = false;

      To

      // This setting enables debug mode, it should NEVER be used on a live site
      $config['debug'] = true;

      results in just such an error.

      This error occurs with the core config.php file edited from:

      // $config['Misc']['debug'] = true;

      To

      $config['Misc']['debug'] = true;

      Therefore, I gave up on it and moved on.

      Comment

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24287
        • 6.0.X

        #4
        What program are you editing the config file with? Don't use Windows Notepad....it will mess up the file. Use a proper text editor, such as Notepad++, which is free.
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • McLarenDan
          New Member
          • Jan 2013
          • 27
          • 4.2.X

          #5
          There are also two debug fields that I was editing to turn it on and off - if that's any help?

          also, as Mark said, don't use Notepad... Notepad ++ all the way!

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 74132

            #6
            Originally posted by rhens

            This would be the logical course of action if turning on debug mode didn't result in a "cannot read config.php" error. However, changing the presentation config.php file from:

            // This setting enables debug mode, it should NEVER be used on a live site
            $config['debug'] = false;

            To

            // This setting enables debug mode, it should NEVER be used on a live site
            $config['debug'] = true;

            results in just such an error.

            This error occurs with the core config.php file edited from:

            // $config['Misc']['debug'] = true;

            To

            $config['Misc']['debug'] = true;

            Therefore, I gave up on it and moved on.

            Remove the UTF8 BOM at the beginning of your saved files. Either save them in ASCII mode or UTF Without BOM mode. Do not use Microsoft tools to edit these files as Microsoft loves the BOM and it breaks the files.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            Related Topics

            Collapse

            Working...