Uncaught Unknown file id xx in table yy

Uncaught Unknown file id xx in table yy

Monika2018Monika2018 Posts: 13Questions: 1Answers: 0
edited October 2021 in DataTables 1.10

Hi Allan, hi community,

I do have a problem with FILE Upload.
Using Editor Version 2.0.5

I use File upload with a single file.
I have a table "medien" with an primary key for the fileId.
I have a sub table "v_arten" with a foreign key.
When I try to upload a file,
and press "upload"
the file is copied to the prospected file.
the dataset is written to the table "medien".
but the error "Uncaught Unknown file id xx in table yy" occurs.
if i press "save" again an then leave the pop-up dialog - the foreign key is written in the tabel "v_arten".
IF i press "cancel" it wont.

The dialog does not finish - you have to cancel it.
The "save" button changes to "processing" and will stay like this producing the error again and again.

Here is what I have in the javascript datatables definition:

var table =  $('#example).DataTable( { 
        ajax: {   url: 'dt-e.v_arten.php'    } ,  
        columns: [    
             .. more columns ... only excerpt ..
             {
                data: "v_arten.idFMedien", 
                render: function ( fileId ) {  
             return fileId ?
                            '<img src="'+table.file( 'medien', fileId ).webPath+'" height="85px"/>' :
                          'No image'; 
                  },
                defaultContent: "kein Bild",
                title: "Bild"
                  }
             (..)
            ],
        select: true,
        select: {
            style: 'os'
        },
              
buttons: [

         {   extend: "create", className: "create",
                editor: editor,
                formButtons: [
                    'Speichern',
                    { text: 'Abbrechen', action: function () { this.close(); } }
                ]
            },      
            { extend: "edit",  className: "edit",
                 editor: editor ,
                 formButtons: [
                    'Speichern',
                    { text: 'Abbrechen', action: function () { this.close(); } }
                ]
            },
             {
                extend: "remove", className: "delete",
                editor: editor,
                formButtons: [
                    'Ja, Eintrag löschen',
                    { text: 'Nein danke', action: function () { this.close(); } }
                ]
            },      
            ], 
           

(the coding ist longer - i shortened it )

And here the editor definition:

var editor = new $.fn.dataTable.Editor( {
        ajax: {  url: 'dt-e.v_arten.php'  
             } ,
  
        table: "#example",
        i18n: {
           create: {
                button: "Neu",
                title:  "Neuer Eintrag",
                submit: "neu"
            },
            edit: {
                button: "Bearbeiten",
                title:  "Eintrag bearbeiten",
                submit: "Speichern"
            },
            remove: {
                button: "Löschen",
                title:  "Löschen",
                submit: "Löschen",
                confirm: {
                    _: "Sollen wirklich %d Zeilen unwiderruflich und komplett gelöscht werden?",
                    1: "Soll wirklich ein %d Eintrag unwiderruflich und komplett gelöscht werden?"
                }
            }, 
            error: {
                system: "Ein Fehler ist aufgetreten." 
            },
                datetime: {
                    months:   [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ],
                    weekdays:   ['So', 'Mo', 'Di', 'Mi','Do', 'Fr', 'Sa'  ],
                } 
            },
        fields: [       
                { 
                    label: "Bezeichnung:",
                    name: "v_arten.Bezeichnung"
                } 
                , { 
                    label: "Beschreibung:",
                    name: "v_arten.Beschreibung",
                    type: "textarea"
                } 
              ,  
               {
                 label : "Startseite:",
                 name : "v_arten.AnzeigeStartseite",
                 type : "checkbox",
                 separator  : "|",
                 unselectedValue: 0,
                 options : [{ label: "", value: 1 }] 
                } 
              , { 
                    label: "Reihenfolge:",
                    name: "v_arten.ReihenfolgeStartseite"
                } 
            ,    
                 {
                label: "Bild: 180px x 120px ",
               name: "v_arten.idFMedien", 
                type: "upload", 
                display: function (  fileId ) { 
                       return '<img src="'+table.file( 'medien', fileId ).webPath+'"/>';
                      
                },
                uploadText: "Durchsuchen ..",
                clearText: "Entfernen",
                dragDropText: "Datei hierher ziehen ...",
                noImageText: 'Kein Bild'  
            }]  ,
    } );

And here an excerpt of the PHP:

<?php 
include( $dt_lib."DataTables.php" );
use
    DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Mjoin,
    DataTables\Editor\Options,
    DataTables\Editor\Upload,
    DataTables\Editor\Validate,
    DataTables\Editor\ValidateOptions;
  
$out = Editor::inst( $db, 'v_arten' , 'v_arten.idVArt') 
            ->fields(
                Field::inst( 'v_arten.idVArt' ) ->set(false), //ID is automatically set by the database on create
                Field::inst( 'v_arten.Bezeichnung' )
                    ->validator( Validate::notEmpty( ValidateOptions::inst()
                    ->message( 'Bitte eine Bezeichnung eintragen' ) 
                     ) ),
                Field::inst( 'v_arten.Beschreibung' )
                    ->validator( Validate::notEmpty( ValidateOptions::inst()
                    ->message( 'Bitte eine Beschreibung eintragen' ) 
                     ) )    ,                   
                Field::inst( 'v_arten.AnzeigeStartseite' )    ,         
                Field::inst( 'v_arten.ReihenfolgeStartseite' )  ,        
                Field::inst( 'v_arten.Bildname' ),
                Field::inst( 'v_arten.idFMedien' ) 
                    // ->setFormatter( Format::ifEmpty( null ) )               
                    ->setFormatter(  'Format::nullEmpty' )   
                    ->upload( Upload::inst( $_SERVER['DOCUMENT_ROOT'].$_SESSION['root'].'/uploads/system/v_arten/__ID__.__NAME__' )           
                        ->db( 'medien', 'idMedien', array(
                        'fileName'    => Upload::DB_FILE_NAME,
                        'fileSize'    => Upload::DB_FILE_SIZE,
                        'webPath'    =>  Upload::DB_WEB_PATH, 
                        'systemPath' =>  Upload::DB_SYSTEM_PATH ,
                        'AufnahmeUser' => $_SESSION['USER'],
                        'AenderungsUser' => $_SESSION['USER'],
                        'AenderungsDatum' => date("Y-m-d H:i:s")  
                        ) ) 
                        ->validator( Validate::fileSize( 500000, 'Bilder müssen kleiner sein als 500K' ) )
                        ->validator( Validate::fileExtensions( array( 'png', 'jpg', 'jpeg', 'gif' ), "Nur Bilder können hochgladen werden (*.png, *.jpg, *.jpeg, *.gif)" ) )            
                    ->dbClean( function ( $data ) {
                            // Remove the file  from the file system
                            unlink($data[0]['systemPath'] ); 
                            return true;
                        } )
                    )  
                ,            
                Field::inst( 'v_arten.AenderungsDatum' )->set( Field::SET_EDIT ),
                Field::inst( 'v_arten.AenderungsUser' ) ->set( Field::SET_EDIT ),
                Field::inst( 'v_arten.AufnahmeUser' )->set( Field::SET_CREATE ) 
            ) 
 ->on( 'preEdit', function ( $editor, $id, $values )   {
        $editor
            ->field( 'v_arten.AenderungsDatum' )
            ->setValue(  date("Y-m-d H:i:s")  );
        $editor     
            ->field( 'v_arten.AenderungsUser' )
            ->setValue( $_SESSION['USER'] );
    } ) 
 ->on( 'preCreate', function ( $editor, $values ) { 
        $editor
            ->field( 'v_arten.AufnahmeUser' )
            ->setValue( $_SESSION['USER'] );
} )
->debug(true)
    ->process( $_POST )
  ->json();
?> 

Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

This question has accepted answers - jump to:

Answers

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    I am sorry, i was too fast with publishing.
    Just wanted to ask whether anybody can give me a hint.
    And some regards, Monika.

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi,
    sorry - there is one more thing to say:

    It worked with former Edition of Datatables 1.10.16 and the
    Editor Version 1.7.4.

    Now I use Datatables 1.11.3 and Editor 2.0.5

    Regards, Monika.

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi all,

    here is more information, maybe it helps:

    Uncaught Unknown file id 242 in table medien datatables.editor.min.js:41:72
    Should be this function:

    function Ea(a,b){var c=this.files(a);if(!c[b])throw"Unknown file id "+b+" in table "+a;return c[b]}
    

    More ..

    Ea http://localhost/xxxx/sys/libs/datatables/dt-js/datatables.editor.min.js:41
    e http://localhost/xxxx/sys/libs/datatables/dt-js/datatables.min.js:134
    
    display http://localhost/xxxx/admin/dt.v_arten.php:151
    

    the marked codeline here is the line with the return statement.

            {
            label: "Bild: 180px x 120px ",
            name: "v_arten.idFMedien", 
            type: "upload", 
            display: function (  fileId ) { 
                  return '<img src="'+table.file( 'medien', fileId ).webPath+'"/>'; 
            },
    
    

    Should I provide more information?
    Is the description of the error understandable?

    Thanks and greetings, Monika

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin

    Hi,

    Thanks for all the details. One more thing - could you let me know what the JSON return from the server is when the data for the page is loaded please? (i.e. the return from dt-e.v_arten.php)?

    Thanks,
    Allan

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi Allan,

    thanks for your answer.
    here is the json repsonse:

    XHRPOSThttp://localhost/testseite/admin/dt-e.v_arten.php
    [HTTP/1.1 200 OK 47ms]
    
        
    data    []
    files   Object { medien: {…} }
    medien  Object { 243: {…} }
    243 Object { idMedien: "243", fileName: "testbild.jpg", fileSize: "33203", … }
    idMedien    "243"
    fileName    "testbild.jpg"
    fileSize    "33203"
    webPath "/testseite/uploads/system/v_arten/243.testbild.jpg"
    systemPath  "C:/xampp/htdocs/testseite/uploads/system/v_arten/243.testbild.jpg"
    AufnahmeUser    "sa"
    AenderungsUser  "sa"
    AenderungsDatum "2021-10-31 13:09:50"
    upload  Object { id: "243" }
    id  "243"
    debug   [ {…}, {…}, {…} ]
    0   Object { query: "INSERT INTO `medien` ( `fileName`, `fileSize`, `webPath`, `systemPath`, `AufnahmeUser`, `AenderungsUser`, `AenderungsDatum` ) VALUES ( :fileName, :fileSize, :webPath, :systemPath, :AufnahmeUser, :AenderungsUser, :AenderungsDatum )", bindings: […] }
    query   "INSERT INTO `medien` ( `fileName`, `fileSize`, `webPath`, `systemPath`, `AufnahmeUser`, `AenderungsUser`, `AenderungsDatum` ) VALUES ( :fileName, :fileSize, :webPath, :systemPath, :AufnahmeUser, :AenderungsUser, :AenderungsDatum )"
    bindings    [ {…}, {…}, {…}, {…}, {…}, {…}, {…} ]
    0   
    name    ":fileName"
    value   "testbild.jpg"
    type    null
    1   
    name    ":fileSize"
    value   33203
    type    null
    2   
    name    ":webPath"
    value   "-"
    type    null
    3   
    name    ":systemPath"
    value   "-"
    type    null
    4   
    name    ":AufnahmeUser"
    value   "sa"
    type    null
    5   
    name    ":AenderungsUser"
    value   "sa"
    type    null
    6   
    name    ":AenderungsDatum"
    value   "2021-10-31 13:09:50"
    type    null
    1   Object { query: "UPDATE `medien` SET `webPath` = :webPath, `systemPath` = :systemPath WHERE `idMedien` = :where_0 ", bindings: […] }
    query   "UPDATE `medien` SET `webPath` = :webPath, `systemPath` = :systemPath WHERE `idMedien` = :where_0 "
    bindings    [ {…}, {…}, {…} ]
    0   
    name    ":where_0"
    value   "243"
    type    null
    1   
    name    ":webPath"
    value   "/testseite/uploads/system/v_arten/243.testbild.jpg"
    type    null
    2   
    name    ":systemPath"
    value   "C:/xampp/htdocs/testseite/uploads/system/v_arten/243.testbild.jpg"
    type    null
    2   Object { query: "SELECT `idMedien` as 'idMedien', `fileName` as 'fileName', `fileSize` as 'fileSize', `webPath` as 'webPath', `systemPath` as 'systemPath', `AufnahmeUser` as 'AufnahmeUser', `AenderungsUser` as 'AenderungsUser', `AenderungsDatum` as 'AenderungsDatum' FROM `medien` WHERE `idMedien` IN (:wherein1) ", bindings: […] }
    query   "SELECT `idMedien` as 'idMedien', `fileName` as 'fileName', `fileSize` as 'fileSize', `webPath` as 'webPath', `systemPath` as 'systemPath', `AufnahmeUser` as 'AufnahmeUser', `AenderungsUser` as 'AenderungsUser', `AenderungsDatum` as 'AenderungsDatum' FROM `medien` WHERE `idMedien` IN (:wherein1) "
    bindings    [ {…} ]
    0   
    name    ":wherein1"
    value   "243"
    type    null
    

    Best regards, Monika.

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi Allan,

    ... and here the not formatted version - i just realized, that there is more information concerning the bindings.

    {"data":[],"files":{"medien":{"243":{"idMedien":"243","fileName":"testbild.jpg","fileSize":"33203","webPath":"\/testseite\/uploads\/system\/v_arten\/243.testbild.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/243.testbild.jpg","AufnahmeUser":"sa","AenderungsUser":"sa","AenderungsDatum":"2021-10-31 13:09:50"}}},"upload":{"id":"243"},"debug":[{"query":"INSERT INTO  `medien`  ( `fileName`, `fileSize`, `webPath`, `systemPath`, `AufnahmeUser`, `AenderungsUser`, `AenderungsDatum` ) VALUES (  :fileName,  :fileSize,  :webPath,  :systemPath,  :AufnahmeUser,  :AenderungsUser,  :AenderungsDatum )","bindings":[{"name":":fileName","value":"testbild.jpg","type":null},{"name":":fileSize","value":33203,"type":null},{"name":":webPath","value":"-","type":null},{"name":":systemPath","value":"-","type":null},{"name":":AufnahmeUser","value":"sa","type":null},{"name":":AenderungsUser","value":"sa","type":null},{"name":":AenderungsDatum","value":"2021-10-31 13:09:50","type":null}]},{"query":"UPDATE  `medien` SET  `webPath` = :webPath, `systemPath` = :systemPath WHERE `idMedien` = :where_0 ","bindings":[{"name":":where_0","value":"243","type":null},{"name":":webPath","value":"\/testseite\/uploads\/system\/v_arten\/243.testbild.jpg","type":null},{"name":":systemPath","value":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/243.testbild.jpg","type":null}]},{"query":"SELECT  `idMedien` as 'idMedien', `fileName` as 'fileName', `fileSize` as 'fileSize', `webPath` as 'webPath', `systemPath` as 'systemPath', `AufnahmeUser` as 'AufnahmeUser', `AenderungsUser` as 'AenderungsUser', `AenderungsDatum` as 'AenderungsDatum' FROM  `medien` WHERE `idMedien` IN (:wherein1) ","bindings":[{"name":":wherein1","value":"243","type":null}]}]}
    

    That's it
    again regards, Monika.

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin

    That should have found the file id 243 inside the medien table. Can you show me the exact error message text (including the table name and id) please? Obviously the id will change, but that's okay. Perhaps you could show me the JSON for for you show me the error message as well, so both are in-sync.

    Thanks,
    Allan

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi Allan,

    I am sorry, now I do not understand what I should send.

    I try:
    1. error message : The only message I can see is "uncaught unknown file in id xx in table medien." The editor dialog does not show an error message. I see only the caption "Processing" on the save-Button.
    2. Where can I find the information you need to have? The name of the table and insert / select statements I sent in my last post. But it seems you expected somethin different?

    Regards, Monika.

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    oh, is it the loading statements that you need?

    I try :

    {"data":[{"DT_RowId":"row_1","v_arten":{"idVArt":"1","Bezeichnung":"Workshops &amp; Kurse","Beschreibung":"Zirkusluft schnuppern, Kletterkurs, reiten oder einen Film drehen? Bei den Workshops und Kursen gibt es ein vielf\u00e4ltiges Angebot.","AnzeigeStartseite":"1","ReihenfolgeStartseite":"4","Bildname":"workshops_kurse.jpg","idFMedien":"158","AenderungsDatum":"2018-08-17 08:36:47","AenderungsUser":"sa","AufnahmeUser":""}},{"DT_RowId":"row_2","v_arten":{"idVArt":"2","Bezeichnung":"Tagesfahrten","Beschreibung":"Ob Radtour, Bergwanderung oder baden gehen - bei Tagesfahrten handelt es sich um Ferienprogramme im Umkreis von M\u00fcnchen. ","AnzeigeStartseite":"1","ReihenfolgeStartseite":"2","Bildname":"tagesfahrten.jpg","idFMedien":"154","AenderungsDatum":"2018-07-05 00:00:00","AenderungsUser":"sa","AufnahmeUser":""}},{"DT_RowId":"row_3","v_arten":{"idVArt":"3","Bezeichnung":"Stadtranderholung","Beschreibung":"Auf wundersch\u00f6nen Wald- und Wiesengrundst\u00fccken in und um M\u00fcnchen k\u00f6nnen Kinder hier in eine besondere Welt eintauchen. ","AnzeigeStartseite":"1","ReihenfolgeStartseite":"3","Bildname":"stadtranderholung.jpg","idFMedien":"156","AenderungsDatum":"2018-07-05 00:00:00","AenderungsUser":"sa","AufnahmeUser":""}},{"DT_RowId":"row_4","v_arten":{"idVArt":"4","Bezeichnung":"Ferienfahrten","Beschreibung":"Von Ferien auf dem Bauernhof bis hin zu Fahrten ins Ausland. Hierbei handelt es sich um mehrt\u00e4gige Angebote mit \u00dcbernachtung. ","AnzeigeStartseite":"1","ReihenfolgeStartseite":"1","Bildname":"ferienfahrten.jpg","idFMedien":"151","AenderungsDatum":"2018-08-15 11:33:43","AenderungsUser":"sa","AufnahmeUser":""}},{"DT_RowId":"row_5","v_arten":{"idVArt":"5","Bezeichnung":"St\u00e4dt. Erm\u00e4\u00dfigungen","Beschreibung":"Hier sind Ferienangebote aufgelistet, bei denen eine st\u00e4dtische Erm\u00e4\u00dfigung m\u00f6glich ist. N\u00e4heres unter \"Infos Erm\u00e4\u00dfigungen\". ","AnzeigeStartseite":"1","ReihenfolgeStartseite":"5","Bildname":"ermaessigungen.jpg","idFMedien":"159","AenderungsDatum":"2018-07-05 00:00:00","AenderungsUser":"sa","AufnahmeUser":""}},{"DT_RowId":"row_7","v_arten":{"idVArt":"7","Bezeichnung":"Offene Angebote (Ohne Anmeldung)","Beschreibung":"Hier geht es um Ferienangebote,bei denen keine Anmeldung erforderlich ist.","AnzeigeStartseite":"0","ReihenfolgeStartseite":"6","Bildname":"","idFMedien":null,"AenderungsDatum":"2021-10-28 11:42:29","AenderungsUser":"sa","AufnahmeUser":""}},{"DT_RowId":"row_8","v_arten":{"idVArt":"8","Bezeichnung":"Tagesbetreuung","Beschreibung":"Die Kinder werden den Tag \u00fcber betreut.","AnzeigeStartseite":"0","ReihenfolgeStartseite":"0","Bildname":"","idFMedien":null,"AenderungsDatum":"2021-10-28 12:46:02","AenderungsUser":"sa","AufnahmeUser":"jiz_fdb"}},{"DT_RowId":"row_13","v_arten":{"idVArt":"13","Bezeichnung":"test","Beschreibung":"test ie","AnzeigeStartseite":"0","ReihenfolgeStartseite":"9","Bildname":"","idFMedien":null,"AenderungsDatum":"2021-10-28 18:43:08","AenderungsUser":"sa","AufnahmeUser":"sa"}},{"DT_RowId":"row_14","v_arten":{"idVArt":"14","Bezeichnung":"test ohne bild","Beschreibung":"einwandrei","AnzeigeStartseite":"0","ReihenfolgeStartseite":"10","Bildname":"","idFMedien":"247","AenderungsDatum":"2021-11-01 19:58:42","AenderungsUser":"sa","AufnahmeUser":""}},{"DT_RowId":"row_15","v_arten":{"idVArt":"15","Bezeichnung":"asdf","Beschreibung":"asdf","AnzeigeStartseite":"0","ReihenfolgeStartseite":"0","Bildname":"","idFMedien":"239","AenderungsDatum":"2021-10-28 19:15:44","AenderungsUser":"sa","AufnahmeUser":"sa"}}],"options":[],"files":{"medien":{"151":{"idMedien":"151","fileName":"ferienfahrten.jpg","fileSize":"143642","webPath":"\/testseite\/uploads\/system\/v_arten\/151.ferienfahrten.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/151.ferienfahrten.jpg","AufnahmeUser":"","AenderungsUser":"","AenderungsDatum":"0000-00-00 00:00:00"},"154":{"idMedien":"154","fileName":"tagesfahrten.jpg","fileSize":"73525","webPath":"\/testseite\/uploads\/system\/v_arten\/154.tagesfahrten.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/154.tagesfahrten.jpg","AufnahmeUser":"","AenderungsUser":"","AenderungsDatum":"0000-00-00 00:00:00"},"156":{"idMedien":"156","fileName":"stadtranderholung.jpg","fileSize":"134829","webPath":"\/testseite\/uploads\/system\/v_arten\/156.stadtranderholung.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/156.stadtranderholung.jpg","AufnahmeUser":"","AenderungsUser":"","AenderungsDatum":"0000-00-00 00:00:00"},"158":{"idMedien":"158","fileName":"workshops_kurse.jpg","fileSize":"62419","webPath":"\/testseite\/uploads\/system\/v_arten\/158.workshops_kurse.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/158.workshops_kurse.jpg","AufnahmeUser":"","AenderungsUser":"","AenderungsDatum":"0000-00-00 00:00:00"},"159":{"idMedien":"159","fileName":"ermaessigungen.jpg","fileSize":"48904","webPath":"\/testseite\/uploads\/system\/v_arten\/159.ermaessigungen.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/158.workshops_kurse.jpg","AufnahmeUser":"","AenderungsUser":"","AenderungsDatum":"0000-00-00 00:00:00"},"239":{"idMedien":"239","fileName":"40.jpg","fileSize":"149484","webPath":"\/testseite\/uploads\/system\/v_arten\/239.40.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/239.40.jpg","AufnahmeUser":"sa","AenderungsUser":"sa","AenderungsDatum":"2021-10-28 19:15:30"},"247":{"idMedien":"247","fileName":"testbild.jpg","fileSize":"33203","webPath":"\/testseite\/uploads\/system\/v_arten\/247.testbild.jpg","systemPath":"C:\/xampp\/htdocs\/testseite\/uploads\/system\/v_arten\/247.testbild.jpg","AufnahmeUser":"sa","AenderungsUser":"sa","AenderungsDatum":"2021-11-01 19:58:40"}}},"debug":[{"query":"SELECT  `v_arten`.`idVArt` as 'v_arten.idVArt', `v_arten`.`Bezeichnung` as 'v_arten.Bezeichnung', `v_arten`.`Beschreibung` as 'v_arten.Beschreibung', `v_arten`.`AnzeigeStartseite` as 'v_arten.AnzeigeStartseite', `v_arten`.`ReihenfolgeStartseite` as 'v_arten.ReihenfolgeStartseite', `v_arten`.`Bildname` as 'v_arten.Bildname', `v_arten`.`idFMedien` as 'v_arten.idFMedien', `v_arten`.`AenderungsDatum` as 'v_arten.AenderungsDatum', `v_arten`.`AenderungsUser` as 'v_arten.AenderungsUser', `v_arten`.`AufnahmeUser` as 'v_arten.AufnahmeUser' FROM  `v_arten` LEFT JOIN `medien` ON medien.idMedien = v_arten.idFMedien ","bindings":[]},{"query":"SELECT  `idMedien` as 'idMedien', `fileName` as 'fileName', `fileSize` as 'fileSize', `webPath` as 'webPath', `systemPath` as 'systemPath', `AufnahmeUser` as 'AufnahmeUser', `AenderungsUser` as 'AenderungsUser', `AenderungsDatum` as 'AenderungsDatum' FROM  `medien` WHERE `idMedien` IN (:wherein1, :wherein2, :wherein3, :wherein4, :wherein5, :wherein6, :wherein7) ","bindings":[{"name":":wherein1","value":"158","type":null},{"name":":wherein2","value":"154","type":null},{"name":":wherein3","value":"156","type":null},{"name":":wherein4","value":"151","type":null},{"name":":wherein5","value":"159","type":null},{"name":":wherein6","value":"247","type":null},{"name":":wherein7","value":"239","type":null}]}]}
     
    

    Thanks. Monika.

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin

    id xx

    I'm wondering specifically what the id is? Is it the same as the id in the returned JSON from the upload action?

    If you could give me a link to your page that would be really useful as I can debug this live and hopefully save the back and forth.

    Allan

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi Allan,

    the id of the table "medien" is idMedien.
    the id of the table "v_arten" ist idVArt and the relevant foreign key ist "idFMedien".

    I wonder how I can grant you access.

    You have to login with .htaccess and a super-admin account.

    How can I send these Login-information in a more protected manner?

    Monika.

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Sorry, i an not native speeking. Sometimes it takes some time to understand what you tell me.

    id xx >> that "xx" is a placeholder >> whenever I test it, there will be the next id after a new insert.
    in this case it was id 247.

    Monika.

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin

    If you could drop me a private message with the login details that would be perfect. Click my forum user name above and then the "Send message" button.

    Thanks!
    Allan

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi Allan,
    I dropped a message. Hope you found it.
    Thanks. Monika.

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin
    Answer ✓

    Hi Monika,

    Many thanks and apologies for my delayed reply. I've released what is going wrong thanks to your link. The page has two copies of Editor being loaded in

    1. In datatables.min.js
    2. In datatables.editor.min.js

    Remove that second one and it should work!

    The error comes about because there are two different objects for storing the files, and the references are getting mixed up between the two blocks of code being loaded.

    Allan

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Hi Allan,

    first of all - that was the error!
    Thank you so much. I would have overlooked that for ages. I have downloaded the datatables-libraries so many times that I obviously added the editor last time and was not aware of that. So simple (when you look at it) and so much time spent on it.

    Thank you once again for your friendly and persistent support and for this solution.

    Best regads, Monika.

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin
    Answer ✓

    Delighted to hear that we got it sorted in the end :)

    Allan

  • Monika2018Monika2018 Posts: 13Questions: 1Answers: 0

    Indeed. You made my day. Monika.

Sign In or Register to comment.