All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Getting passkey gives error and makes DataGrab unavailable from Control Panel

Status Resolved
Add-on / Version DataGrab 5.0.3
Severity
EE Version 7.3.4

Andrus Kalkun

Jun 29, 2023

Trying to get passkey from setting page to use on EE CLI. Klicking to button gives:

TypeError Caught

BoldMinded\DataGrab\Model\ImportStatus::getDisplayStatus(): Argument #3 ($lastRecord) must be of type int, null given, called in user/addons/datagrab/mcp.datagrab.php on line 180

user/addons/datagrab/Model/ImportStatus.php:189

Stack Trace: Please include when reporting this error

#0 user/addons/datagrab/mcp.datagrab.php(180): BoldMinded\DataGrab\Model\ImportStatus::getDisplayStatus(8, ‘NEW’, NULL, NULL, 0, 0, 0)
#1 [internal function]: Datagrab_mcp->index()
#2 ee/ExpressionEngine/Controller/Addons/Addons.php(1590): call_user_func_array(Array, Array)
#3 ee/ExpressionEngine/Controller/Addons/Addons.php(866): ExpressionEngine\Controller\Addons\Addons->getModuleSettings(‘datagrab’, ‘index’, Array)
#4 [internal function]: ExpressionEngine\Controller\Addons\Addons->settings(‘datagrab’)
#5 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array(Array, Array)
#6 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController(Array)
#7 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#8 admin.php(139): require_once(’...’)
#8 admin.php(139): require_once(’...’)

After that, DataGrab Add-on is unreachable in Control Panel, only the same error page.

PHP 8.1

#1

BoldMinded (Brian)

Comment has been marked private.

#2

Andrus Kalkun

Same, line number changed.

TypeError Caught

BoldMinded\DataGrab\Model\ImportStatus::getPercentage(): Argument #1 ($count) must be of type int, null given, called in user/addons/datagrab/mcp.datagrab.php on line 185 user/addons/datagrab/Model/ImportStatus.php:235

Stack Trace: Please include when reporting this error

0 user/addons/datagrab/mcp.datagrab.php(185): BoldMinded\DataGrab\Model\ImportStatus::getPercentage(NULL, NULL)

1 [internal function]: Datagrab_mcp->index()

2 ee/ExpressionEngine/Controller/Addons/Addons.php(1590): call_user_func_array(Array, Array)

3 ee/ExpressionEngine/Controller/Addons/Addons.php(866): ExpressionEngine\Controller\Addons\Addons->getModuleSettings(‘datagrab’, ‘index’, Array)

4 [internal function]: ExpressionEngine\Controller\Addons\Addons->settings(‘datagrab’)

5 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array(Array, Array)

6 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController(Array)

7 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))

8 admin.php(139): require_once(‘…’)

8 admin.php(139): require_once(‘…’)

#3

BoldMinded (Brian)

Comment has been marked private.

#4

Andrus Kalkun

> Update your exp_modules table and set Datagrab back to version 5.0.4

This part, i don’t know how to do it. I occasionally use PHPMadmin, just to import/export databases and thats it. How to update database table?

#5

BoldMinded (Brian)

In PhpMyAdmin you should see a list of tables, just find the exp_modules table and the row in that table with Datagrab and version 5.0.5 and edit it to 5.0.4.

#6

Andrus Kalkun

OK, it now worked.

Regardless, getting some PHP warning:


Warning Undefined array key “pass_key” user/addons/datagrab/mcp.datagrab.php, line 795

Severity: E_WARNING Warning

Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)

ee/legacy/libraries/Functions.php, line 458

Severity: E_WARNING

But it is working, i can use DataGrab Add-Ons Control Panel page again.

Additional question: did DataGrab go after 5 update pickier about source files? Two of my imports stopped working after version 5 update.

First one – CSV – gets this: Queueing… fgetcsv(): Argument #4 ($enclosure) must be a single character

Second one – Json – gets this: Queueing… The following error occurred: E_DEPRECATED: Return type of BoldMinded\DataGrab\Dependency\Carbon\CarbonInterface::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice File: /system/user/addons/datagrab/vendor-build/nesbot/carbon/src/Carbon/CarbonInterface.php Line: 2818 Consuming… The following error occurred: E_WARNING: Undefined array key “id” File: /system/user/addons/datagrab/Queue/Jobs/ImportItem.php Line: 35 The following error occurred: E_WARNING: Undefined array key 0 File: /system/user/addons/datagrab/Queue/Jobs/AbstractJob.php Line: 41 The following error occurred: E_WARNING: Trying to access array offset on value of type null File: /system/user/addons/datagrab/Queue/Jobs/AbstractJob.php Line: 42 The following error occurred: E_WARNING: Trying to access array offset on value of type null File: /system/user/addons/datagrab/Queue/Jobs/AbstractJob.php Line: 43 The following error occurred: E_WARNING: Trying to access array offset on value of type null File: /system/user/addons/datagrab/Queue/Jobs/AbstractJob.php Line: 44

Worker Stopped

#7

BoldMinded (Brian)

What version of PHP?

#8

Andrus Kalkun

8.1

#9

BoldMinded (Brian)

Have you tried re-saving or re-creating your import configuration?

#10

Andrus Kalkun

No, i haven’t. Do you think it will make a difference?

#11

BoldMinded (Brian)

Yeah it’s worth a shot. Should only take a couple of minutes to make a new import.

#12

Andrus Kalkun

Sorry, went to vacation mode shortly.. Now i’m back.

Re-created one CSV import. Seems to have same problem.

> php system/ee/eecli.php import:run –import_id=10 –limit=1 –key=4DFC04F7E6F3FFDB88E57F94CA4B190D Starting: Smartpost v2… Queueing… The following error occurred: E_DEPRECATED: Return type of BoldMinded\DataGrab\Dependency\Carbon\CarbonInterface::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice File: /system/user/addons/datagrab/vendor-build/nesbot/carbon/src/Carbon/CarbonInterface.php Line: 2818 Consuming… 1/306 Worker Stopped

#13

BoldMinded (Brian)

Is there more to that error message? If so can you share the full stack trace?

Does it work without the passcode?

#14

Andrus Kalkun

No, this is all i get from terminal.

You mean without passkey? Then i get this: Import aborted. Passkey required, but none provided.

#15

BoldMinded (Brian)

Configure the import to not require a passkey and see if it works that way.

#16

Andrus Kalkun

Seems to be exctly the same error:

> php system/ee/eecli.php import:run –import_id=10 –limit=1 Starting: Smartpost v2… Queueing… The following error occurred: E_DEPRECATED: Return type of BoldMinded\DataGrab\Dependency\Carbon\CarbonInterface::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice File: /system/user/addons/datagrab/vendor-build/nesbot/carbon/src/Carbon/CarbonInterface.php Line: 2818 Consuming… 1/306 Worker Stopped

#17

BoldMinded (Brian)

Comment has been marked private.

#18

Andrus Kalkun

As before, at Control Panel newly recreated imports now work, but CLI gives these errors. CLI is important as i want to automate these.

php system/ee/eecli.php import:run –import_id=11 –limit=1 Starting: DPD v2… Queueing… The following error occurred: E_DEPRECATED: Return type of BoldMinded\DataGrab\Dependency\Carbon\CarbonInterface::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice File: /system/user/addons/datagrab/vendor-build/nesbot/carbon/src/Carbon/CarbonInterface.php Line: 2818 Consuming… 1/841 Worker Stopped

#19

BoldMinded (Brian)

Ok, this is not an error I’m able to replicate locally and I’ve been running 8.1 for awhile. No one else is reporting this bug either. Are you able to share a login to your CP, or at least share the entire output of your PHP Info page?

#20

BoldMinded (Brian)

Comment has been marked private.

#21

Andrus Kalkun

Meanwhile, here is PHP info.

https://www.dropbox.com/scl/fi/xqprz0vi7c2wv1rdd6ezg/PHP-8.1.16-phpinfo.pdf?rlkey=z6ns9uvn8vtn5r19vp94s7ax3&dl=0

#22

Andrus Kalkun

Now something has changed. Trying to use different (three) imports. No errors, but sometimes no completion too.

Import id=11, json, DPD v2 with limit=1

virt12780:sn-69-4.tll07.zoneas.eu:~/domeenid/www.loremipsum.ee/htdocs/stetro> php stetroee/ee/eecli.php import:run --import_id=11 --limit=1
Starting: DPD v2... 
Queueing...
Consuming...
1/841
Worker Stopped

Import id=11, json, DPD v2 with no limit

virt12780:sn-69-4.tll07.zoneas.eu:~/domeenid/www.loremipsum.ee/htdocs/stetro> php stetroee/ee/eecli.php import:run --import_id=11        
Starting: DPD v2... 
Queueing...
Consuming...
50/841
Worker Stopped

Import id=11, json, DPD v2 with limit=850

Worker Stopped
virt12780:sn-69-4.tll07.zoneas.eu:~/domeenid/www.loremipsum.ee/htdocs/stetro> php stetroee/ee/eecli.php import:run --import_id=11 --limit=850
Starting: DPD v2... 
Queueing...
Consuming...
766/841
Worker Stopped

Import id=10, csv, Smartpost v2 with no limit

virt12780:sn-69-4.tll07.zoneas.eu:~/domeenid/www.loremipsum.ee/htdocs/stetro> php stetroee/ee/eecli.php import:run --import_id=10
Starting: Smartpost v2... 
Queueing...
Consuming...
50/306
Worker Stopped

Import id=10, csv, Smartpost v2 with limit=350

virt12780:sn-69-4.tll07.zoneas.eu:~/domeenid/www.loremipsum.ee/htdocs/stetro> php stetroee/ee/eecli.php import:run --import_id=10 --limit=350
Starting: Smartpost v2... 
Queueing...
Consuming...
Complete!
Complete!

Import id=12, csv, Omniva v2 with no limit

virt12780:sn-69-4.tll07.zoneas.eu:~/domeenid/www.loremipsum.ee/htdocs/stetro> php stetroee/ee/eecli.php import:run --import_id=12
Starting: Omniva v2... 
Queueing...
Consuming...
50/1269
Worker Stopped

Import id=12, csv, Omniva v2 with limit=1300

virt12780:sn-69-4.tll07.zoneas.eu:~/domeenid/www.loremipsum.ee/htdocs/stetro> php stetroee/ee/eecli.php import:run --import_id=12 --limit=1300
Starting: Omniva v2... 
Queueing...
Consuming...
767/1269
Worker Stopped

On Control panel import works.

#23

BoldMinded (Brian)

I don’t know what you’re trying to import or how it’s configured, so I can’t speculate on what is happening. “Worker Stopped” is common to see multiple times in the debug file though. Are rows getting added to and then removed from the exp_datagrab_queue table?

#24

BoldMinded (Brian)

All that output looks normal, so I’d check the jobs table, check the DataGrab-import.log file etc. I just tested the CLI import locally and it works fine.

Sorry, it’s the datagrab_jobs table, not queue.

#25

BoldMinded (Brian)

Be sure to check out the docs: https://docs.boldminded.com/datagrab/docs/automatic-imports/importing-with-cron

Login to reply