Uncaught TypeError: Cannot read property 'error' of null

Uncaught TypeError: Cannot read property 'error' of null

slim0801slim0801 Posts: 4Questions: 1Answers: 0
edited November 2015 in DataTables 1.10

Hello, i get this error in the console: (Uncaught TypeError: Cannot read property 'error' of null), from what i have read in the forums it is due to utf8_encoding, i have tried to force the encoding as other users suggested by modifying this:

        $pdo = @new PDO(
            "mysql:host={$host};{$port}dbname={$db}".self::dsnPostfix( $dsn ),
            //"mysql:host={$host};{$port}dbname={$db}".self::dsnPostfix( $dsn ).";charset=utf8",
            $user,
            $pass,
            array(
                PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
            )
        );

        $pdo->query('SET CHARACTER SET utf8');
        $pdo->query('SET NAMES utf8');

But it still does not work, do you have any suggestions?

Answers

  • slim0801slim0801 Posts: 4Questions: 1Answers: 0

    Sorry, i forgot to mention the error: Uncaught TypeError: Cannot read property 'error' of null

  • allanallan Posts: 61,887Questions: 1Answers: 10,142 Site admin

    Hi,

    This error suggests that the server might be returning null in response to the Ajax request that Editor makes. Can you give me a link to the page so I can take a look please?

    Allan

  • slim0801slim0801 Posts: 4Questions: 1Answers: 0

    Hello, the link is under a login page, i will send you via email, then i will post the solution after that so other users can see.

  • svaldenegrosvaldenegro Posts: 3Questions: 1Answers: 0

    And then what happen?

  • svaldenegrosvaldenegro Posts: 3Questions: 1Answers: 0

    I have this error:
    Uncaught TypeError: Cannot read property 'error' of nullbaseAjax.success @ jquery.datatables.js:2552i @ jquery.js:2j.fireWith @ jquery.js:2z @ jquery.js:4(anonymous function) @ jquery.js:4

    And using default example project.

  • slim0801slim0801 Posts: 4Questions: 1Answers: 0

    In my case the problem was that the PDO extension was not installed on the server and the datatables cannot make queries without it.

This discussion has been closed.