Following a successful migration, if I click on the number in the Messages column I get "MigrateException: No migration found with machine name messages in MigrationBase::getInstance() (line 438 of /Users/example/Sites/drupal-7.15-pressflow/sites/example.com/modules/migrate/includes/base.inc)."

Comments

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

What's the machine name of the migration? What's the URL you get when clicking on the messages link? With migrate_example, if I click on the messages column for the BeerUser migration, I get http://example.com/admin/content/migrate/messages/BeerUser - it's sounds like somehow you're missing the "BeerUser" part.

mikeryan’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No further information provided.

jonathan_hunt’s picture

Status: Closed (cannot reproduce) » Active

Reopened, now I'm working on this again. Path for link in Messages column is admin/content/migrate/messages/JDEKind.

Migration class is defined as

class JDEKindMigration extends Migration {
mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

And you're still getting that error message? Something seems funky with your menus, can you check migrate_ui.module and make sure that in migrate_ui_menu(), the admin/content/migrate/messages/%migration entry is setting page arguments to array(4) (what you're seeing would happen if it were mistakenly array(3))?

jonathan_hunt’s picture

Status: Postponed (maintainer needs more info) » Active

FYI, same error with http://example.com/admin/content/migrate/messages/BeerUser.

This issue turns out to be an interaction with Menu Trail by Path (http://drupal.org/project/menu_trail_by_path). Menu Trail by Path walks up the path and tries to set active trail on each path component. This triggers a match on admin/content/migrate/%migration and Migrate attempts to load a Migration with the machine_name 'messages'.

It can be solved with a specific test for $machine_name == 'messages' in getInstance() in base.inc, or Menu Trail by Path needs a way of avoiding specific paths (feature request at #1831698: Add configuration option to avoid specific paths).

mikeryan’s picture

Component: Code » migrate_ui

Actually, I think the base problem is having the detail pages directly under admin/content/migrate, which creates a namespace conflict with 'messages' (making it problematic to have a migration with that machine name, which isn't really that unlikely a scenario). The detail pages should be under, say, admin/content/migrate/details/%migration.

clemens.tolboom’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

Thanks for reporting ... it puzzled me a lot as it worked long time for one of my importers.

Status: Needs review » Needs work

The last submitted patch, migrate-ui-path-1794236-7.patch, failed testing.

clemens.tolboom’s picture

Status: Needs work » Needs review
StatusFileSize
new1.35 KB

[edit: finished some sentences]

Darn ... I hand edited the file (as it resided in my full drupal repo). Removed hashes.

One thing that puzzles me still is I get the same error with this patch applied.

From admin/content/migrate follow to admin/content/migrate/details/TopicForum

MigrateException: No migration found with machine name TopicForum in MigrationBase::getInstance() (line 444 of /Users/clemens/.../sites/all/modules/custom/contrib/migrate/includes/base.inc).

So not sure the resolution from #6 is the solution

The last submitted patch, migrate-ui-path-1794236-9.patch, failed testing.

mikeryan’s picture

Status: Needs review » Fixed

I think the patch failed because you weren't completely up-to-date against 7.x-2.x. I manually incorporated your changes and it works fine, thanks.

Note that your message suggests an entirely different cause than this issue. @jonathan_hunt was seeing a complaint about the non-existent machine name "messages", due to the interaction of our poor namespacing of menu paths and the Menu Trail by Path module. Your message is about machine name TopicForum, so it will have an entirely different cause (worth another issue if you don't work it out on your own). Check your migrate_status table and make sure the migration is properly recorded there.

clemens.tolboom’s picture

Version: 7.x-2.4 » 7.x-2.x-dev

Status: Fixed » Closed (fixed)

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

true-north-strong-and-free’s picture

I had the same issue and it turned out to be a problem in .migrate.inc file

Please make sure that you have:

'migrations' => array(
'JDEKind' => array('class_name' => 'JDEKindMigration'),

in [your_module_name]_migrate_api() from [your_module_name].migrate.inc file.

No patches or other code changes were necessary.

I am using Migrate 2.5 on Drupal 7.22

leex’s picture

I had this problem and I honestly changed nothing to make it start working. This occurred twice.

When it finally started working the second time I changed the key for the 'migrations' array from 'AccountsMigration' to 'Accounts'. I cleared the cache and voila, it worked. I then changed the key back to 'AccountsMigration' cleared the cache and it kept working.

I know you think it was clearing the cache which solved the problem after I changed some other parameter but it wasn't. I had just cleared the cache before trying this and it still didn't work. I had the exact same problem with a migration I had setup earlier and it just randomly started working. I think computers just don't like me.

Things to check:

Cache is cleared
Module is enabled
Migration has been registered (should happen automatically)

cameron prince’s picture

I ran into this problem as well and can confirm that disabling Menu Trail By Path restores normal behavior.

wuffers’s picture

I'm running into this with the phpbb2Drupal migration module. I don't have Menu Trail By Path installed and don't have the luxury of disabling modules one by one to check where the conflict is. Where can I check my error messages directly inside the Drupal db?

moonray’s picture

Issue summary: View changes

#16 has the correct answer in my case as well. There is a conflict with menu_trail_by_path module.
Once you use a newer (dev) version of migrate module this should no longer be an issue.

BillyTom’s picture

I have the same problem using Menu Trail By Path & Migrate: I have no problem executing migrations, but when I click on the message column I get the error "MigrateException: No migration found with machine name news". It happens with all of my migrations.

Is there a way to access the migrate-messages without having to disable Menu Trail By Path everytime?

I am using Menu Trail By Path 7.x-2.0 and Migrate 7.x-2.5.