Import function validates but doesn't work

Permalink Browser Info Environment
Hi There,

I have tried to import and the App successfully validates my file with 3 records in it, but it just sits there saying task progress 0 of 3 directories imported.

Please confirm import process is working. I am using immediate import.

Thanks

1 Attachment

Type: Ticket
Status: In Progress
peachautomation
View Replies:
peachautomation replied on at Permalink Reply 1 Attachment
peachautomation
Looks like it's stuck with a chron job that does not exist for Staff Directory. HELP

I have already setup the Concrete chron job to run the scheduler:
* * * * * /path/to/public/concrete/bin/concrete concrete:scheduler:run >> /dev/null 2>&1

When I look at the Concrete automation tasks list there is nothing there related to the Staff Directory either.

If I look at the CPanel chron job there is nothing there related to staff directory either......
peachautomation replied on at Permalink Reply
peachautomation
I found the import function in the folder /packages/staff_directory/jobs/complete_import.php

When I run it, it generates an error.log in the folder as below. Looks like a class error.
Please resolve ASAP.
The import page in the dashboard shows:
Import files are showing a status of Queued/Unstarted
Import queued. Waiting for the chron job to start the process.

Error.log
[16-Jun-2022 06:06:54 UTC] PHP Fatal error: Uncaught Error: Class 'Concrete\Core\Job\Job' not found in /home/acc/public_html/packages/staff_directory/jobs/complete_import.php:5
Stack trace:
#0 {main}
thrown in /home/acc/public_html/packages/staff_directory/jobs/complete_import.php on line 5

Here is the file code in complete_import.php:

<?php
namespace Concrete\Package\StaffDirectory\Job;
use \Concrete\Core\Job\Job as AbstractJob;

class CompleteImport extends AbstractJob
{

public function getJobName()
InformaticsInc replied on at Permalink Reply
InformaticsInc
Hello - Thank you for reaching out. We're working to resolve and will provide status when the update is available.
InformaticsInc replied on at Permalink Reply
InformaticsInc
Hello - we've updated Staff Directory to v1.2.0 and resolved the issue. Please let us know if you have any additional questions or issues. thanks!
peachautomation replied on at Permalink Reply
peachautomation
Hi There, I don't seem to be able to update the package. The version remains as 1.1.9

I have uninstalled and re-installed and de-associated it with my project and re-associated but the version remains the same.

In the Extend Concrete section under Update Add-Ons it says:

No updates for your add-ons are available.

Please advise how to update the package. Thanks
InformaticsInc replied on at Permalink Reply
InformaticsInc
We're taking a look and will let you know our findings.
InformaticsInc replied on at Permalink Reply
InformaticsInc
Hello,

Please download and install the latest version 1.2.0.

Due to the way ConcreteCMS has coded the task functionality, the cron command they provided may not work. If they cron command provided by Concrete5 does not execute properly, try one of the following options:

Option one:
Make sure that the file /path/to/public/concrete/bin/concrete concrete has execute permissions (774) and then use the following cron (make sure to replace /path/to/public with the path to your webroot and yourC5version with the proper C5 version you are using):

* * * * * cd /path/to/public/ && /path/to/public/concrete/bin/concrete concrete:scheduler:run >> /dev/null 2>&1

Or if you are using a version of Concrete5/ConcreteCMS in the updates folder:

* * * * * cd /path/to/public/ && /path/to/public/updates/yourC5version/concrete/bin/concrete concrete:scheduler:run >> /dev/null 2>&

Option two:
Make sure you have php-cli installed on your server and use one of the following crons (make sure to replace /path/to/public with the path to your webroot and yourC5version with the proper C5 version you are using):

* * * * * cd /path/to/public/ && php /path/to/public/concrete/bin/concrete concrete:scheduler:run >> /dev/null 2>&1

Or if you are using a version of Concrete5/ConcreteCMS in the updates folder:

* * * * * cd /path/to/public/ && php /path/to/public/updates/yourC5version/concrete/bin/concrete concrete:scheduler:run >> /dev/null 2>&
peachautomation replied on at Permalink Reply
peachautomation
How do I download version 1.2.0 there is no download link anywhere.

I tried updating the CRON as you suggested and seem to have now broken the scheduling completely in my C5 version. It was working before and now not working. I feel I am going backwards....

The problem is with your software not being recognised as a new package version by C5, and therefore it won't download the new version. I have uninstalled it, de assciated it and everything. If you send me the file I can install it but I don't have access to the new files?

Help
peachautomation replied on at Permalink Reply
peachautomation
Finally - I worked out how to upgrade, bit of a saga.....

1) Navigate to your MarketPlace Projects page and "Release From Project" the Staff Directory Add-On.
2) Navigate to your profile in MarketPlace (the head icon) and click on Purchase History.
3) Under the Edit Profile click on Licenses on the right hand side
4) Click on the black text "download archive" which will save the package onto your computer.
5) Next FTP to your web server and delete the "staff_directory" folder in the /packages directory.
6) Extract the ZIP archive that you downloaded in step 4 to your local computer.
7) Upload the "staff_directory" folder to the /packages directory on the server
8) Open your Concrete CMS site and navigate to the dashboard, Click on the "Extend Concrete" item
9) You will see Staff_Directory is still listed as the old version
10) Click on the dashboard menu item "Updated Add-Ons"
11) You will see that you can now update the installed version of Staff Directory. Click Update and you are now complete.
peachautomation replied on at Permalink Reply
peachautomation
I fixed the task scheduler so can now confirm that is working by using the below script instead of the one Concrete provided.

* * * * * /usr/local/bin/php -q /home/sitename/public_html/concrete/bin/concrete concrete:scheduler:run >> /dev/null 2>&1

Next problem is that it still won't import. The file validates ok and then the progress bar displays and says: Import Started and task status is 0 of 2.

If I run the scheduled task from the scheduler "Staff Directory Import Task" it also produces an error: An error occurred while processing this request.

The error log shows:

Exception Occurred: /home/acc/public_html/concrete/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:129 Handling "Concrete\Package\StaffDirectory\Src\Task\Command\CompleteImportCommand" failed: An exception occurred while executing 'INSERT INTO atDefault (value, avID) VALUES (?, ?)' with params ["\x85", 3459]:

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\x85' for column 'value' at row 1 (0)


Each time I run it the error looks the same with the last line of SQLSTATE being consistent for this '\x85'

I note that the old import files had a different section number that the one I am importing now as I have deleted and re-created the Site Directory page on the site navigation a few times.

Can you help resolve this final issue.
I wonder the old import files are still stuck in the queue and now causing the error?

Everything appears to be correct. I did un-install and re-install Site Directory to try to clear any queued files but the history of imports remains and is not removed as it's still there upon re-install. Is there a way to see if they are in the queue still?

Here is the import history:
Import History
File Name Import Method Status Message Date Modified
import_28062022183450.csv Immediate Queued/Unstarted Import queued. Waiting for the chron job to start the process. 06/28/2022
import_16062022145349.csv Use Cron Job (All at once) Queued/Unstarted Import queued. Waiting for the chron job to start the process. 06/16/2022
import_16062022030921.csv Immediate Queued/Unstarted Import queued. Waiting for the chron job to start the process. 06/16/2022
import_16062022024557.csv Immediate Queued/Unstarted Import queued. Waiting for the chron job to start the process. 06/16/2022

Thanks
InformaticsInc replied on at Permalink Reply
InformaticsInc
Hello - we'll be reaching out directly by email to get some additional information and continue troubleshooting. Thanks!
InformaticsInc replied on at Permalink Reply
InformaticsInc
Hello,

We've looked into the issue that you're facing, and reviewed the file you sent by email. It appears that the issue is related to the database encoding.

It looks like the issue is occurring because there is a column in the sheet that has three dots "..." - this is converting into utf8-mb4. However, your database seems to be in utf8 encoding.

There are two ways to solve this:
1. Either use uts8-mb4 for the database encoding
2. Or fill the correct data in the "bio" field instead of using triple dots.

Thanks

concrete5 Environment Information

v9.1.1

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.