Fixed one problem to run into another... need help with this error

Status
Not open for further replies.

Ryusaikou

New Member
Ok so i got past the cascading dropdown issue but now I am having a problem when I try to add a record. I get this

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/jconken/public_html/components/com_fabrik/models/element.php on line 978

Warning: Illegal offset type in /home/jconken/public_html/components/com_fabrik/models/element.php on line 1086

Warning: Illegal offset type in /home/jconken/public_html/components/com_fabrik/models/element.php on line 1088

Fatal error: Class 'uploader' not found in /home/jconken/public_html/plugins/fabrik_element/fileupload/fileupload.php on line 1540

Any idea what i can do to fix this?
 
I, too, get that error when submitting a form since updating to 3.0.6.3-0:

PHP Fatal error: Class 'uploader' not found in [...]/plugins/fabrik_element/fileupload/fileupload.php on line 1540

Last working version was 3.0.6.1.
 
same for me uploading a .pdf.

Fatal error: Class 'uploader' not found in /home/xxxxxxxxxx/public_html/dtl/plugins/fabrik_element/fileupload/fileupload.php on line 1540
 
Ok i did the changes you stated troester in fileupload.php and now the records actually get added, but I still have these errors
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/jconken/public_html/components/com_fabrik/models/element.php on line 978

Warning: Illegal offset type in /home/jconken/public_html/components/com_fabrik/models/element.php on line 1086

Warning: Illegal offset type in /home/jconken/public_html/components/com_fabrik/models/element.php on line 1088
 
Out of sight out of mind... thatll work lol. I have one more question for you though... Rob helped me make this .js
Code:
// do the code when the form loads
window.addEvent('fabrik.form.elements.added', function() {
    splitInventory();
    // do the code when the inventory field is updated
    $('masterdb___Inventory').addEvent('blur', function() {
        splitInventory();
    });
});
// this is the main code which takes the input from 'Masterdb___Inventory' and inserts it into various fields
function splitInventory() {
    //form_2 is the main form object, we're just setting els to be a shortcut to its formElements array
    var els = form_2.formElements;
    //get the inventory code and split it into an array
    var s = els.get('masterdb___Inventory').getValue().split('-');
    if (s.length < 3) {
        //incorrect format - don't continue
        return;
    }
    //set the serial fields value    
    els.get('masterdb___serial').update(s[1]);
    // set the barn descirpt field to be the first and third part of the inventory code
    els.get('masterdb___Barndescript').update(s[0]+'-'+s[2]);
    // format the date to be DD-MM-YY and update the datepurchased element
    var date = s[3].substring(0, 2)+'-'+s[3].substring(2, 4)+'-'+s[3].substring(4, 6);
    els.get('masterdb___datepurchased').update(date);

    //trigger the cdd update
    var cdd = els.get('masterdb___Build_Basis');
    //create a mock event to pass into the cdd's dowatch() method
    var e = {
        'target':$('masterdb___Barndescript'),
        'type':'change'
    };
    cdd.dowatch(e);
}
It worked great in fabrik 2.x but I am getting nothing in 3.x... any ideas for that?
 
Troesters pull request should be in github now
No idea about the js I would have to see the page, and for you to tell me where you are adding the js
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top