Forums / Addon Admin Tools / Database I/O Manager (DbIo) Plugin [Support Thread]

Database I/O Manager (DbIo) Plugin [Support Thread]

Views: 104,216

Results 461 to 480 of 621
24 Aug 2023, 6:35 PM
#461
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Database I/O Manager (DbIo) Plugin [Support Thread]

ZC Version 1.5.8a

ERROR LOG:

[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...

20 years a Zencart User

24 Aug 2023, 8:31 PM
#462
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

schoolboy:

ZC Version 1.5.8a

ERROR LOG:

[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 ?

20 years a Zencart User

26 Aug 2023, 1:24 PM
#463
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

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.

29 Aug 2023, 2:09 PM
#464
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

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:

20 years a Zencart User

19 Jan 2024, 7:35 PM
#465
project_jayden avatar

project_jayden

New Zenner

Join Date:
Jan 2019
Location:
Lake Elsinore, CA
Posts:
19
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

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!

19 Jan 2024, 9:42 PM
#466
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

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.

21 Jan 2024, 8:41 PM
#467
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

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.

5 Feb 2024, 1:31 AM
#468
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,845
Plugin Contributions:
17

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

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:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

5 Feb 2024, 2:45 PM
#469
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

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.

5 Feb 2024, 6:43 PM
#470
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,845
Plugin Contributions:
17

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

17,000+ line items waiting patiently to be added :P :hug:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

5 Feb 2024, 7:14 PM
#471
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

dbltoe:

17,000+ line items waiting patiently to be added :P :hug:
Try changing line 205 of /admin/includes/classes/dbio/DbIoOptionsStockFullHandler.php from

        if ($sql_query !== false && $this->operation !== 'check') {

to

        if ($this->operation !== 'check') {

Does that correct the issue?

5 Feb 2024, 9:06 PM
#472
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,845
Plugin Contributions:
17

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

Unfortunately, not.

Got this

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Feb 2024, 12:03 AM
#473
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

@dbltoe, shoot a copy of the to-be-imported CSV to my direct email address, please.

6 Feb 2024, 12:06 AM
#474
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,845
Plugin Contributions:
17

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

On the way.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Feb 2024, 1:03 AM
#475
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

dbltoe:

On the way.
Thanks, dealt with via private email conversation.

23 Feb 2024, 4:44 PM
#476
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

Hi all, just a couple of questions I'm having trouble finding the answer to in the readme docs, etc.

  1. Is there a way to update a product with a linked category without changing the master category? In otherwords, how can I add/update a new product with 2 or 3 different categories through DBIO? Can more than one category be listed in the v_categories_name column, and if so, what should I use to separate them?

  2. If I turn on the "allow duplicate model" option, would I be able to simply "overwrite" an existing product with a new product without having to use the REMOVE command for the old and a new line for the NEW? I have a lot of unique, single quantity items, so trying to find an easy way to just replace old, out of stock items with the new ones without having to create a bunch of new products.

11 Jun 2024, 10:12 AM
#477
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

I would like the ability to see the next product ID in the admin, I regularly create new products via the DBio plugin and to get the next product ID I have to create a test product to see the next ID and then delete the test product.

Am I missing exactly where I can see the next ID to use for new products, or if possible is there a way to add into the csv to simply use next id availible?

11 Jun 2024, 10:54 PM
#478
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

DannyVarley:

I would like the ability to see the next product ID in the admin, I regularly create new products via the DBio plugin and to get the next product ID I have to create a test product to see the next ID and then delete the test product.

Am I missing exactly where I can see the next ID to use for new products, or if possible is there a way to add into the csv to simply use next id availible?
You don't have to see the next product ID. If you simply use a v_dbio_command column and set that column to ADD, the processing will automatically add the product so long as its configuration is ok-fine.

See this (https://github.com/lat9/dbio/wiki/ProductsHandler-Usage-Notes) GitHub Wiki article for additional information.

12 Jun 2024, 8:27 AM
#479
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

lat9:

You don't have to see the next product ID. If you simply use a v_dbio_command column and set that column to ADD, the processing will automatically add the product so long as its configuration is ok-fine.

See this (https://github.com/lat9/dbio/wiki/ProductsHandler-Usage-Notes) GitHub Wiki article for additional information.

Perfect, this is so much simpler!

12 Jun 2024, 1:22 PM
#480
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Database I/O Manager (DbIo) Plugin [Support Thread]

When I try the ADD in the command I get the issues:

✗ products.products_id, line #2: Value () is not an integer
✗ products.products_date_added, line #2: Value (0000-00-00 00:00:00) is not a recognized date value; the default value for the field will be used.

not sure if I need to put something in the products id or I need to sort the issue with the date value?

Im missing something somewhere im sure :(