migration – Error during import (The header record must be an empty or a flat array with unique string values)

I want to import some content into my site from a CSV file (bellow) (the file is originally an .xlsx and I use a online CSV converter to get the CSV file)

format,type,name,address,id,ttx
open,semi-transparent,Thomas Chao,,rk39k3as22,coming soon

And here’s my migration file:

id: migrate_content
label: 'Import content from CSV to CMS'
migration_group: migration
source:
  plugin: csv
  # Full path to the file.
  path: '/var/www/html/myproject/web/sites/default/files/migrations/test_1.csv'
  header_offset: 1
  ids: (id)
  keys:
    - id
  constants:
    status: 1
process:
  title:
    plugin: create_title
  field_format: format
  field_type: type
  field_name: name
# field_address: address
  field_ttx: ttx
  status: constants/status
destination:
  plugin: 'entity:node'
  default_bundle: granularity_type
migration_dependencies:
  required: {  }
  optional: {  }

When I run drush migration:import migrate_content, I get this error.

The header record must be an empty or a flat array with unique string values.

importxml – How to import ALL tickers from investing.com to google sheets?

I waste a lot of time tumbling from one country list of stocks (on investing.com) to another looking for stocks to buy.

How can I aggregate stocks from all countries (and exchanges) to one sheet, with selected parameters (say market cap and 1 month perf.)?

vmware – Whonix Import Error Unexpected element “Envelope”

I can’t import whonix, getting this error

Line 22: Unexpected element 'Envelope'.

From VMWare Worsktation Pro on Win10

What should I do ?

SharePoint 2019 – Why doesn’t the People WebPart import all of the information in AD?

I am currently using SharePoint 2019 and I have synced all of my users from AD into our SharePoint environment. When I add the Peoples Webpart on a new page for testing purposes and then add one of our users to it, only the email and the mobile phone are displayed when hovering over each profile. I would like to figure out why it doesn’t display properties like department or their desk phone number. Is there something I have missed during the syncing process? All of this information is in AD and when I edit the profile in SharePoint.

How can I import multiple select attributes in Magento 2.3.5?

I’m working with a new installation of 2.3.5.

I am unable to import a multi-select product attribute.

My attribute I’m trying to import is “Year” for auto parts.

I have tried importing with the column header “year”, which is the attribute code. I have also tried importing with the column header “additional_attributes” with value “Year=1967|1968”. Neither of these work.

When I manually set the “year” attribute on a product and export that product, it is exported via “additional_attributes” with value “Year=1967|1968”.

I’ve tried importing exactly what is exported, but that doesn’t work either. It doesn’t give me any errors when importing, it just doesn’t change any value on the product.

I’ve tried using a semicolon, a comma, etc. as field separator. I have “Fields enclosure” unchecked as well.

All attribute values I’m importing already exist within the “Year” attribute.

Any help would be greatly appreciated.

Thanks.

media library – Does using the WordPress Import tool still include attachment data if “Download and import file attachments” is not selected?

I’m in a unique situation where I have to import WordPress content into a production server, but I don’t have SSH access to the server files or database. I can’t install plugins on the production server, so I am limited to the built-in WordPress Importer tool.

I don’t have any issues bringing over Posts and Pages, but it’s extremely hit or miss when bringing over the Media Library, of which I have something like ~2000 items.

What I do have, however, is access to the S3 bucket where the production server hosts the Media Library. The production server also automatically rewrites URLs for the media library to point to the S3 bucket.

My question is: If I migrate my Media Library files to my S3 bucket beforehand, then use the WP Exporter tool to export “All content” from my source site and import it into my production site and leaving “Download and import file attachments” unchecked, will my Attachment data (not the files themselves) still be imported into the database?

magento2 – Create custom import history entry in magento 2

I’m using a custom import products code and i want to add a new import history entry when i use my custom import
and create an error report csv file while imported file is invalid.
Any help please !!

this is my custom import code:

public function importProduct($rowData){

$csvModel = $this->csvFactory->create(('destination' => self::PATH_FILENAME));
$csvModel->writeRow($rowData);

$importModel = $this->importModelFactory->create();

$importModel->setData((
            "entity"=>"catalog_product",
            "behavior"=>"add_update",
            "validation_strategy"=>"validation-stop-on-errors",
            "allowed_error_count"=>"10",
            "_import_field_separator"=>";",
            "_import_multiple_value_separator"=>","
        ));

$sourceModel = MagentoImportExportModelImportAdapter::findAdapterFor(
                self::PATH_FILENAME,
                $this->objectManager->create(MagentoFrameworkFilesystem::class)
                                    ->getDirectoryWrite(MagentoFrameworkAppFilesystemDirectoryList::ROOT),
                $importModel->getData(MagentoImportExportModelImport::FIELD_FIELD_SEPARATOR)
        );

$isValid = $importModel->validateSource($sourceModel);
if ($importModel->getProcessedRowsCount() === 0 || 
    !$isValid || 
    $importModel->getErrorAggregator()->getErrorsCount()
) {
    var_dump($importModel->getErrorAggregator()->getAllErrors());
    exit;
}

try {
    $importModel->importSource();
    echo "sucess import";
} catch (Exception $e) {
    throw new Exception($e->getMessage());
}}

java – Is there a way to import bitcoin wallet into BitcoinJ?

I tried to create bitcoin wallet that could be available as from BitcoinJ as from standart desktop wallet client (Bitcoin.com client e.g.) but it seems that I don’t get something important.

I exported the wallet from desktop client which looks like
this.
After decrypting it with https://bitwiseshiftleft.github.io/sjcl/demo/, I got this.

The problem is the Wallet.class methods to import wallets are all eventually have seed creation time as a parameter, which is not stated in exported version of the wallet (setting it randomly doesn’t help).

So basically I need any options to transform this exported data into working BitcoinJ wallet.
Any help or advices would be gratelly appreciated!

magento2 – Import Product Programmatically

For product import,

I used to create a CSV file from the text file (from customer) via programming. Then I place it in var/import folder

Now, For Magento 1.9

My code was :

$profile = Mage::getModel('dataflow/profile');
$profile->load(7);  (7 for products)
$profile->run();

My all product are imported successfully.

The same way Now I am trying for Magento 2.3

I have successfully created CSV file from the text file (from customer) via programming.
Also from Admin > System > Data transfer > Scheduled import/export > New Scheduled Import
I have created one “scheduled import” for product.

Now, Please help me, how can I run it via programming. like ($profile->run();)

Thanks in advance

Using drush config import and update db in a rolling deployment (k8s) environment

Disclaimer: complete Drupal newbie here. I’m the infrastructure guy in the team.

We are running various Drupal 8.9 instances on Kubernetes using a managed MariaDB outside k8s.

We build Docker containers for each instance on a build server using composer. Then, once deployed, a script initializes Drupal using a combination of drush cim, drush cr, drush updb and a few conditionals.

Kubernetes provides a rolling deployment so the current instance keeps running until the new container is up.
Now here’s the issue I can’t wrap my head around: the new and old instance both write to the same database. So drush cim from the new instance runs against the same DB as the live environment, possibly breaking the live instance.

I’m currently trying to catch this in my init script, but it proves to be non trivial. Ideas I came up with like cloning the db, doing the import there, testing if it works and then reimporting on the live instance appear overly complicated, Right now I do a dump before the drush cim so I can at least restore the instance if it fails but the site might still go down for a few minutes … is there a Drupal way of doing this properly? Maybe a config import dry run or forcing drush cim to use a SQL transaction? Do you guys have any idas or input? Anything helps. Thank you!