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, 2023Trying 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
BoldMinded (Brian)
Jun 29, 2023
Comment has been marked private.
Andrus Kalkun
Jun 29, 2023
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(’...’)
BoldMinded (Brian)
Jun 29, 2023
Comment has been marked private.
Andrus Kalkun
Jun 30, 2023
> 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?
BoldMinded (Brian)
Jun 30, 2023
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.
Andrus Kalkun
Jun 30, 2023
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
BoldMinded (Brian)
Jun 30, 2023
What version of PHP?
Andrus Kalkun
Jun 30, 2023
8.1
BoldMinded (Brian)
Jun 30, 2023
Have you tried re-saving or re-creating your import configuration?
Andrus Kalkun
Jun 30, 2023
No, i haven’t. Do you think it will make a difference?
BoldMinded (Brian)
Jul 04, 2023
Yeah it’s worth a shot. Should only take a couple of minutes to make a new import.
Andrus Kalkun
Jul 23, 2023
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
BoldMinded (Brian)
Jul 23, 2023
Is there more to that error message? If so can you share the full stack trace?
Does it work without the passcode?
Andrus Kalkun
Jul 23, 2023
No, this is all i get from terminal.
You mean without passkey? Then i get this:
Import aborted. Passkey required, but none provided.
BoldMinded (Brian)
Jul 23, 2023
Configure the import to not require a passkey and see if it works that way.
Andrus Kalkun
Jul 23, 2023
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
BoldMinded (Brian)
Jul 24, 2023
Comment has been marked private.
Andrus Kalkun
Jul 25, 2023
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
BoldMinded (Brian)
Jul 25, 2023
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?
BoldMinded (Brian)
Jul 25, 2023
Comment has been marked private.
Andrus Kalkun
Jul 25, 2023
Meanwhile, here is PHP info.
https://www.dropbox.com/scl/fi/xqprz0vi7c2wv1rdd6ezg/PHP-8.1.16-phpinfo.pdf?rlkey=z6ns9uvn8vtn5r19vp94s7ax3&dl=0
Andrus Kalkun
Jul 25, 2023
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
Import id=11, json, DPD v2
with no limit
Import id=11, json, DPD v2
with limit=850
Import id=10, csv, Smartpost v2
with no limit
Import id=10, csv, Smartpost v2
with limit=350
Import id=12, csv, Omniva v2
with no limit
Import id=12, csv, Omniva v2
with limit=1300
On Control panel import works.
BoldMinded (Brian)
Jul 25, 2023
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?
BoldMinded (Brian)
Jul 25, 2023
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.
BoldMinded (Brian)
Jul 25, 2023
Be sure to check out the docs: https://docs.boldminded.com/datagrab/docs/automatic-imports/importing-with-cron