Quote Originally Posted by schoolboy View Post
ZC Version 1.5.8a

ERROR LOG:
Code:
[24-Aug-2023 18:25:17 UTC] PHP Fatal error:  Uncaught ValueError: fgetcsv(): Argument #4 ($enclosure) must be a single character in /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php:331
Stack trace:
#0 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php(331): fgetcsv()
#1 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php(270): DbIo->getCsvRecord()
#2 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/dbio_manager.php(242): DbIo->dbioImport()
#3 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/index.php(11): require('...')
#4 {main}
  thrown in /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php on line 331

[24-Aug-2023 18:25:17 UTC] Request URI: /MY-ADMIN-FOLDER/index.php?cmd=dbio_manager&action=file, IP address: XX.XXX.XXX.XXX
--> PHP Fatal error: Uncaught ValueError: fgetcsv(): Argument #4 ($enclosure) must be a single character in /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php:331
Stack trace:
#0 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php(331): fgetcsv()
#1 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php(270): DbIo->getCsvRecord()
#2 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/dbio_manager.php(242): DbIo->dbioImport()
#3 /var/www/vhosts/MY-WEBSITE.com/httpdocs/MY-ADMIN-FOLDER/index.php(11): require('...')
#4 {main}
  thrown in /var/www/vhosts/MY-WEBSITE.com/httpdocs/EMY-ADMIN-FOLDER/includes/classes/dbio/DbIo.php on line 331.
Any ideas? Filename is correct. CSV is comma-delimited (and set to this in DBIO config) - but there is no Enclosure in the file - doesn't need one. There is no MODEL NUMBER as the products are DOCUMENT-GENERAL (type 3).
EDIT - Looks like LINE 331insists on "Enclosure" - let me put one in and try again...
OK - have "repaired" the issue...
This website is using ONLY the DOCUMENT_GENERAL product type - for which there is no admin screen INPUT for "Model Number" when adding/editing a product. (IE: we are using ZC as a "general CMS" for showcasing magazine and newspaper articles - so are not using any of ZC's shopping functions).
I therefore had blanks in the CSV file for "v_products_model" - but if I add these to th CSV, then the data import works.
... Maybe an idea to facilitate a function in DBIO that if a "product" is DOCUMENT_GENERAL, then v_products_model is not a mandatory field in the CSV ?