Glue for Craft CMS

For Craft CMS 5

Two entries in, one entry out

For the afternoon somebody discovers the importer ran twice, or that a client has been quietly maintaining two versions of the same product page since 2019. Glue puts both entries side by side, lets you pick a winner field by field, and writes the result.

Glue

The merge screen

One row per field, and a Take choice on each. Every choice starts on whichever entry actually has a value, so the common case is a handful of decisions. Change one and the Result column recomputes, because the Result column is the merge, run without the save.

Entries → News → Merge with Glue
Field Take Result

“Both” only appears where it means something. Dates, numbers, switches and dropdowns have no sensible “both”, so Glue doesn’t offer it for them.

Features

A real merge, built on Craft’s own way of copying a field, with the traps that come with it already handled.

Field by field

Two entries side by side, one row per field of the target entry type, with A, B, Both or Neither on each. Choices start on whichever side has a value.

  • The Result column is the merge, run for real and not saved
  • Fields the target cannot hold are named before you press the button

“Both” that means something

Relations and multi-selects get a union in A’s order, Tables and Matrix get A’s rows then B’s, and text gets A’s, a separator, then B’s. Third-party fields are classified by what they serialize to.

  • B’s Matrix blocks are copied, not moved. B keeps its own

New entry, or into a source

Merge to a new entry and both sources survive untouched. Merge into one of them and it keeps its ID, its URL, its revisions and every inbound link. Then leave, disable or trash the originals.

Repoint what linked to it (Pro)

Re-save every entry, category or asset that related to a retired source, so it relates to the merged entry instead. Each field keeps its order, and duplicates are dropped.

  • Real element saves, not an UPDATE on the relations table
  • Large rewires go to the queue
  • Reference tags are counted and reported, not rewritten

A history that remembers

A merged entry looks exactly like one somebody typed. Glue records what went in, what came out, who did it, what they chose and what it warned about, and shows it on the entry’s own edit screen.

Built for volume (Pro)

A duplicate finder to work out which pairs are worth merging, presets that replay a screen’s worth of choices, every site at once, and console commands with a dry run.

  • Presets live in project config and deploy with the entry types they describe

Install it, then inspect before you merge

No other plugins, no build step and no third-party services. glue/inspect writes nothing and works on Lite, so you can see what a merge would do before you buy anything.

bash
composer require justinholtweb/craft-glue
php craft plugin/install glue

# What would merging these two do? (free, writes nothing)
php craft glue/inspect --a=482 --b=917

# Pro: merge into A, trash B, repoint everything that linked to B
php craft glue/merge --a=482 --b=917 --target=a --disposition=trash --rewire

# Pro: which pairs are worth merging in the first place?
php craft glue/duplicates --section=news

Frequently Asked Questions

The questions worth answering before you merge anything.

Two editions, both of them complete

Lite is $59 with a $49/year renewal, and is a complete merge tool: every “Both” strategy, every target, the warnings and the history. Pro is $79 with a $69/year renewal, and adds relation rewiring, presets, cross-site merging, the console commands and the duplicate finder.