Re: Simple Instructions for Import
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...
Re: Simple Instructions for Import
Quote:
Originally Posted by
schoolboy
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 ?
Re: Simple Instructions for Import
Quote:
Originally Posted by
schoolboy
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 ?
Thanks for the report and analysis, @schoolboy. Unfortunately the DbIo products' import is complicated enough without adding specific processing for the document-general product type.
I'll note that when you perform a products' export, you'll see that the (albeit empty) products_model column is present.
Re: Simple Instructions for Import
Quote:
Originally Posted by
lat9
I'll note that when you perform a products' export, you'll see that the (albeit empty) products_model column is present.
Thanks Cindy
Yes... simply by inserting unique "model numbers" into the CSV fixes the issue. Perhaps a note in your installation documents to point this out is (as you so rightly say) a lot easier than 4 million lines of extra code :smile:
Re: Simple Instructions for Import
zencart 1.5.8a
PHP Version: 8.0.30
Database Engine: MySQL 8.0.36
Having an issue using the productattributesbasic importer.
Product imports work excellent! Uploading over 1000 products seemed to go without any issue (although it did give me a ton of warnings although no errors).
The only problem I am having is I downloaded the productattributesbasic CSV and I wanted to reupload it so I can have my drop down menus etc again. Uploading the spreadsheet is fine but as soon as I select the import and hit the go button I get this error:
This page isn’t working is currently unable to handle this request.
HTTP ERROR 500
Anybody else experience this? Not sure what I am doing wrong. (I did not make any changes to the file or the filename itself)
Thank you for your help!
Re: Simple Instructions for Import
Server 500 implies that there's a debug-log (myDEBUG-adm-*.log) in the site's /logs directory. You can send me a copy to my direct email address.
Re: Simple Instructions for Import
v2.0.1 of the Database I/O Manager (DbIo) is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2091
This release contains changes associated with the following GitHub issues:
#212: Correct sprintf messages for split-file message.
#215: Use different names for different forms, correcting HTML validation issue.
#217: Correct PHP error when exporting via the DbIoProductsAttribsBasicHandler.
#218: Correct DbIoProductsAttribsBasicHandler import processing.
1 Attachment(s)
Re: Simple Instructions for Import
1.5.8a
PHP 7.4
POSM and DBIO
Trying to add a product using the following but no joy. I'm sure it's something simple:blush:
Re: Simple Instructions for Import
Quote:
Originally Posted by
dbltoe
1.5.8a
PHP 7.4
POSM and DBIO
Trying to add a product using the following but no joy. I'm sure it's something simple:blush:
Not a base DbIo issue. I've noted the issue in POSM's private GitHub and will check that out soon.
Re: Simple Instructions for Import
17,000+ line items waiting patiently to be added :P :hug: