1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

php error_log: large number of PHP Notice about fileupload element

Discussion in 'Community' started by mirceat, Feb 21, 2020.

  1. mirceat

    mirceat Member

    Level: Community
    Hello,

    I have a form that contain (among other elements) a fileupload element where users can upload a .csv file (optional). Nothing fancy, just a regular upload (no ajax upload), the uploaded files are stored on the local webserver.

    Checking the PHP log I see a lot of notices about the fileupload element..what could be the cause? The indicated lines in code seems to ask for attributes of a file that in many case is not uploaded by the user..

    line 1636: $fileData = $_FILES[$name]['name'];
    line 1681-1685:
    $file = array('name' => $_FILES[$name]['name'],
    'type' => $_FILES[$name]['type'],
    'tmp_name' => $_FILES[$name]['tmp_name'],
    'error' => $_FILES[$name]['error'],
    'size' => $_FILES[$name]['size']);

    Code (Text):
    [21-Feb-2020 18:02:46 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1636
    [21-Feb-2020 18:02:46 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1681
    [21-Feb-2020 18:02:46 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1682
    [21-Feb-2020 18:02:46 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1683
    [21-Feb-2020 18:02:46 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1684
    [21-Feb-2020 18:02:46 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1685
     
  2. lousyfool

    lousyfool Active Member

    Level: Community
    Hi,

    When was your last Github update? Because your line numbers do not correlate with the ones in the actual build. So, first a complete, fresh Github update?
     
    Last edited: Feb 22, 2020
  3. mirceat

    mirceat Member

    Level: Community
    ok, i updated to Github on Sunday.. same PHP notices on the same code snippets as above, only the line numbers has changed + one new notice on line 1833: $pkVal = $origData[$j]->$pkName;

    Code (Text):
    [25-Feb-2020 13:04:53 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1675
    [25-Feb-2020 13:04:53 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1720
    [25-Feb-2020 13:04:53 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1721
    [25-Feb-2020 13:04:53 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1722
    [25-Feb-2020 13:04:53 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1723
    [25-Feb-2020 13:04:53 Europe/Bucharest] PHP Notice:  Undefined index: contracts_tool_servicii___importa_pdf_servicii in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1724
    [25-Feb-2020 13:05:23 Europe/Bucharest] PHP Notice:  Undefined property: stdClass::$contracts_tool_servicii___id_raw in D:\webserver\Apache24\htdocs\aplicatii\plugins\fabrik_element\fileupload\fileupload.php on line 1833
     
     
  4. lousyfool

    lousyfool Active Member

    Level: Community
    Just did some tests, but can't reproduce.
    How is your fileupload element configured? Screenshots?
     

Share This Page