Problem/Motivation

Currently when multiple (Drupal) migration sources are defined, and metatag is only installed in one of the sources, the migrations will be failing with an error Base table or view not found: 1146 Table "d7_site2.metatag" doesn't exist:.

This is caused by a clever static caching cleverly added to avoid checking for metatag on each row, introduced in #3190808: Do not run a "table exists" query for every migrated row of data (regardless of whether it's a metatag row or not!).
This check doesn't take in consideration that there might be multiple sources and will reuse the information only from the first migration source.

Steps to reproduce

Proposed resolution

Only statically cache the information regarding the metatag status based on the database source.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

esolitos created an issue. See original summary.

esolitos’s picture

Added simple patch which resets the cache if db source changes.

damienmckenna’s picture

Status: Active » Needs review

Thanks for putting that together.

Let's see what the testbot says.

damienmckenna’s picture

StatusFileSize
new2.15 KB

If the migration switches back to the first source again won't it needlessly rerun the same logic? How about this?

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks for raising the issue and providing a fix, esolitos.

damienmckenna’s picture

esolitos’s picture

Thanks, your patch was a better approach indeed. :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

wim leers’s picture

Multiple sources?!