PHPackages                             baikho/drupal-jobs\_import\_demo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. baikho/drupal-jobs\_import\_demo

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

baikho/drupal-jobs\_import\_demo
================================

Drupal Demo multilingual XML job import.

v1.0.1(1mo ago)15↑2900%GPL-2.0-or-laterPHPPHP &gt;=8.1

Since Mar 28Pushed 1mo agoCompare

[ Source](https://github.com/baikho/drupal-jobs_import_demo)[ Packagist](https://packagist.org/packages/baikho/drupal-jobs_import_demo)[ RSS](/packages/baikho-drupal-jobs-import-demo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (3)Used By (0)

Drupal Jobs Import Demo
=======================

[](#drupal-jobs-import-demo)

[![Latest Version on Packagist](https://camo.githubusercontent.com/65cedf31831c2f9f88a1566a6aff99f7215af12a64b9466801aa9a95beca65b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6261696b686f2f64727570616c2d6a6f62735f696d706f72745f64656d6f2e737667)](https://packagist.org/packages/baikho/drupal-jobs_import_demo)[![Total Downloads](https://camo.githubusercontent.com/69f272e866e22c7a61a900c806f97ed8dbd6d2e82275ba94a7c3d51140c76b01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6261696b686f2f64727570616c2d6a6f62735f696d706f72745f64656d6f2e737667)](https://packagist.org/packages/baikho/drupal-jobs_import_demo)[![MIT Licensed](https://camo.githubusercontent.com/41fb9477e1e2061ff1095fb51dab22787a2972a9a4c10b22630214e5722ac38f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6261696b686f2f64727570616c2d6a6f62735f696d706f72745f64656d6f2e737667)](https://github.com/baikho/drupal-jobs_import_demo/blob/main/LICENSE.txt)[![GitHub issues](https://camo.githubusercontent.com/309f573116cafee7773bf3316e43d216eb96f9b03d8ac2e1927655f005981beb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6261696b686f2f64727570616c2d6a6f62735f696d706f72745f64656d6f2e737667)](https://github.com/baikho/drupal-jobs_import_demo/issues)[![GitHub stars](https://camo.githubusercontent.com/8eb28fa92aba4689909b28f0e444206b608ba6b128f83781229ba94b317a4fb7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6261696b686f2f64727570616c2d6a6f62735f696d706f72745f64656d6f2e737667)](https://github.com/baikho/drupal-jobs_import_demo/stargazers)

Drupal module demonstrating a **multilingual XML → vacancy** import using core **Migrate**, **Migrate Plus** (`simple_xml` + HTTP URL source), **Migrate Tools** (Drush `--sync` and related commands), **Ultimate Cron** (packaged hourly job), composite source IDs, self-**migration\_lookup** for translations, and **`ImportCronService`** (background Drush import from cron).

---

Table of contents
-----------------

[](#table-of-contents)

1. [Overview](#overview)
2. [Requirements](#requirements)
3. [Installation](#installation)
4. [What this module provides](#what-this-module-provides)
5. [Layout](#layout)
6. [Usage](#usage)
7. [XML fixture](#xml-fixture)
8. [Troubleshooting](#troubleshooting)
9. [License](#license)

---

Overview
--------

[](#overview)

- **Migration** `jobs` imports rows from an XML feed into **`vacancy`** nodes (`translations: true`).
- Each **``** under `Job/ExternalPublication` is one source row; **job id + locale** uniquely identify the row; **migration\_lookup** on `job_id` alone reuses one node per job across languages.
- The feed URL comes from **`FeedEndpoint`**: an absolute HTTP URL to **`/jobs-import-demo/demo-feed.xml`** (same XML as `fixtures/job_feed.xml`).
- **`config/optional`** supplies **`vacancy`**, the three fields the migration uses, a minimal **`full`** text format (only if `filter.format.full` is not already in the active config), default form/view displays, and translation settings. Each file is imported **only when that config name is not already present**, so existing sites (e.g. one that already exports **`vacancy`**) are not overwritten.

---

Requirements
------------

[](#requirements)

AreaDetails**Drupal**10.3+ or 11.x**Modules**`migrate`, `migrate_plus`, **`migrate_tools`**, **`ultimate_cron`**, `node`, `user`, `language`, `content_translation`, `link`, `text`, `filter`, `datetime`, `path`**Content**Either use the optional **`vacancy`** bundle + fields from **`config/optional`**, or provide the same machine names yourself: **`field_description`** (text, **`full`** format), **`field_publication_date`** (datetime), **`field_website`** (link)---

Installation
------------

[](#installation)

From your Drupal project root:

```
composer require baikho/drupal-jobs_import_demo
drush en jobs_import_demo -y
drush cr
```

---

What this module provides
-------------------------

[](#what-this-module-provides)

PiecePurpose**Migrate Plus group** `jobs_import_demo``drush mim --group=jobs_import_demo`**Migration** `jobs`YAML in `migrations/jobs.yml`**Source** `job_feed_url`Extends Migrate Plus `Url`; injects URL from `FeedEndpoint`**Process** `migration_lookup_first_nid`After `migration_lookup` by shared job id only: if several nids are returned, keep the first so `nid` is a single translation target**Process** `static_map` (core)Demo map `en_US` / `nl_NL` / `fr_FR` → langcodes; extend `map` in YAML for more locales**Service** `jobs_import_demo.feed_endpoint`Resolves feed URL (demo HTTP route)**Service** `jobs_import_demo_cron``ImportCronService::jobsImportCron()` — background `drush mim …` (non-blocking)**Install config** (`config/install`)`migrate_plus.migration_group.jobs_import_demo`, `ultimate_cron.job.jobs_import_demo_jobs_cron` (hourly; disable or edit in UI if not wanted)**Optional config** (`config/optional`)**`node.type.vacancy`**, field storage + instances, **`filter.format.full`** (if missing), **`language.content_settings.node.vacancy`**, default entity displays**Install**Adds **Dutch** (`nl`) and **French** (`fr`) if missing (fixture includes `nl_NL` and `fr_FR`)---

Layout
------

[](#layout)

```
jobs_import_demo/
├── README.md                 # This file
├── LICENSE.txt
├── jobs_import_demo.info.yml
├── jobs_import_demo.routing.yml
├── jobs_import_demo.services.yml
├── jobs_import_demo.install
├── config/
│   ├── install/
│   │   ├── migrate_plus.migration_group.jobs_import_demo.yml
│   │   └── ultimate_cron.job.jobs_import_demo_jobs_cron.yml
│   └── optional/            # vacancy + fields + full format + displays (skip if names already exist)
├── fixtures/
│   └── job_feed.xml
├── migrations/
│   └── jobs.yml
└── src/
    ├── Controller/
    │   └── DemoJobFeedController.php
    ├── Plugin/
    │   ├── migrate/process/   # MigrationLookupFirstNid
    │   └── migrate/source/    # JobFeedUrl
    └── Service/
        ├── FeedEndpoint.php
        └── ImportCronService.php

```

---

Usage
-----

[](#usage)

### Drush

[](#drush)

```
drush en jobs_import_demo -y
drush cr
drush mim --group=jobs_import_demo --update
drush ms --group=jobs_import_demo
```

With sync (remove destinations missing from source). The **`--sync`** flag is provided by **Migrate Tools**:

```
drush mim --group=jobs_import_demo --update --sync
```

### Cron

[](#cron)

- **Ultimate Cron** is a **hard dependency**: on install, config **`Jobs Import Demo — jobs`** is created (hourly). Disable or reschedule it under **Configuration → System → Cron** (Ultimate Cron UI) if needed.
- The job calls **`jobs_import_demo_cron:jobsImportCron()`**, which runs a non-blocking shell to `vendor/bin/drush mim --group=jobs_import_demo --update --sync`.

---

XML fixture
-----------

[](#xml-fixture)

`fixtures/job_feed.xml` is shaped like a typical HR export:

- Root **``**, repeated **``**.
- **``** contains **``** with `Jobname`, `ShortDescription`, `Leadaftertitle`, `Publicationdate`, `URL`.

The migration maps those elements via Migrate Plus **`simple_xml`** and the selectors in `migrations/jobs.yml`. **`publication_id`** is read from **`@ID`** for traceability; source IDs for the map remain **`job_id` + `locale`**.

---

Troubleshooting
---------------

[](#troubleshooting)

IssueThings to check**Migration not found**`drush cr` after install; confirm `migrate_plus` enabled.**Field / bundle errors**On a fresh install, enable the module once so **`config/optional`** can create **`vacancy`** and fields; or define the same machine names yourself. The description field must allow the **`full`** text format (optional config can create a minimal **`full`** if it is missing).**Empty source / fetch errors**Ensure `$base_url` in `settings.php` is reachable from PHP (CLI/Drush) so the demo feed route can be fetched.**Cron never runs**Ultimate Cron job **Jobs Import Demo — jobs** enabled; Ultimate Cron module running.**`drush` not found in cron**`ImportCronService` uses `DRUPAL_ROOT/../vendor/bin/drush`; adjust deployment layout if different.---

License
-------

[](#license)

GPL-2.0-or-later (see `LICENSE.txt`).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance90

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4416197e9209c87ec5067d297e3dbfefa4023f93b9fe8a9d16d1e46e2ed46b0?d=identicon)[baikho](/maintainers/baikho)

---

Top Contributors

[![baikho](https://avatars.githubusercontent.com/u/4610533?v=4)](https://github.com/baikho "baikho (3 commits)")

---

Tags

drupaldrupal-10drupal-11drupal-demodrupal-developersdrupal-moduledrupal-projectexample-codeimporterphpdrupal

### Embed Badge

![Health badge](/badges/baikho-drupal-jobs-import-demo/health.svg)

```
[![Health](https://phpackages.com/badges/baikho-drupal-jobs-import-demo/health.svg)](https://phpackages.com/packages/baikho-drupal-jobs-import-demo)
```

###  Alternatives

[farmos/farmos

A web-based farm record keeping application.

1.2k6.7k1](/packages/farmos-farmos)[tripal/tripal

Tripal is a toolkit to facilitate construction of online genomic, genetic (and other biological) websites.

709.9k9](/packages/tripal-tripal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
