Product table empty


I was using Invoiceninja 3.3.0 self hosted. Everything was working great until my product table suddenly got empty for no reason. So i updated to 3.5.1 but it is still the same, the table is empty. I tried creating a new product which I did successfully but it does not appear in the table. Still empty… What can I do to debug that ?



I’m not sure I understand, are you saying the MySQL products table is empty or are you referring to the UI?

I’m referring to the UI. I didn’t checked the mysql table.

In the UI, all my products disapear but they are still in the drop-down list on Quote page.

Back to products page, if I change the filter from active to something else, I have this error :
DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see

Do you see any errors if you load /update (or /public/update) in your browser.

No errors…

Here is what I have with firefox debug tool :

 <script type="text/javascript">
        var NINJA = NINJA || {};
        NINJA.fontSize = 9;
        NINJA.isRegistered = true;

        window.onerror = function (errorMsg, url, lineNumber, column, error) {
            if (errorMsg.indexOf('Script error.') > -1) {

            try {
                // Use StackTraceJS to parse the error context
                if (error) {
                    var message = error.message ? error.message : error;
                    StackTrace.fromError(error).then(function (result) {
                        var gps = new StackTraceGPS();
                        gps.findFunctionName(result[0]).then(function (result) {
                            logError(errorMsg + ': ' + JSON.stringify(result));
                } else {

                trackEvent('/error', errorMsg);
            } catch (err) {

            return false;

        function logError(message) {
                type: 'GET',
                url: '',
                data: 'error=' + encodeURIComponent(message) + '&url=' + encodeURIComponent(window.location)

        function sweetConfirm(success, text, title) {
            title = title || "Voulez-vous vraiment effectuer cette action ?";
                //type: "warning",
                //confirmButtonColor: "#DD6B55",
                title: title,
                text: text,
                cancelButtonText: "Non",
                confirmButtonText: "Oui",
                showCancelButton: true,
                closeOnConfirm: false,
                allowOutsideClick: true,
            }).then(function() {

        /* Set the defaults for DataTables initialisation */
        $.extend(true, $.fn.dataTable.defaults, {
            "bSortClasses": false,
            "sDom": "t<'row-fluid'<'span6 dt-left'i><'span6 dt-right'p>>l",
            "sPaginationType": "bootstrap",
            "bInfo": true,
            "oLanguage": {
                'sEmptyTable': "Aucune donn&eacute;e disponible dans la table",
                'sLengthMenu': '_MENU_ lignes',
                'sInfo': "Affichage _START_ sur _END_ de _TOTAL_ entr&eacute;es",
                'sSearch': ''

        /* This causes problems with some languages. ie, fr_CA
         var appLocale = 'fr';

                function fbq() {
            // do nothing
                window._fbq = window._fbq || [];


    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src=""></script>
    <script src=""></script>

If the problem started out of nowhere my guess is some data was added which the app is failing to parse.

If you want to email an export of your product data to I’ll see if I can replicate the problem.

I think I know what happened. I have added a product with text after the number, like “50 CHF”. When I saved, InvoiceNinja removed the text “CHF” but since that moment my list is empty. Maybe I should check the mysql table…

I can’t replicate the problem, the app should strip off the characters after the number.


I find the mistake by opening the mysql database. I did a wrong copy/past and put some text inside a product comment.
You can reproduce the problem by adding this text inside one of your product comment :

**Etape 2 : **
ddddsdfsdfk sdlkfj lsdkjf lskjdfl sjdfl jsldfj lsdjfl ksdjf.
sdf lkjsdlf kjsdlfj sldkfj lsdkjf ljs.
sdflkjsldjf ljsdlfkj "sdlkjflskdjf".
sdflkjsdfl jsdlfk jsdlfkj sdlkfj.
sdflkjsdlfkjsdlfkj (sdlfkjsdlfkj) sdlfkjsdlkfjl.
sdlfj sldkfj lsdkjf lkj 2.5" sdflkjsdflk jsdf.

*sdféklsdéflksdélfkésdk éskdfél ksdéfl ksdélfkésl dkfésdgjlkejrgklejrlkgjelkrgjlej *.

Now everything is okay.
Thanks for your great work.