Obsidian Update
Migration has failed. I have attempted with and without other mods, both times it fails.
Item5e
TypeError: action.endsWith is not a function at Object.convertAttack (core.js:97) at Object.convertItem (migrate.js:159) at beginMigration (run.js:32) at HTMLButtonElement.<anonymous> (run.js:145) at HTMLButtonElement.dispatch (jquery.min.js:2) at HTMLButtonElement.v.handle (jquery.min.js:2)
Comments (4)
-
repo owner -
reporter - attached actors.db
-
repo owner So this turned out to not be an obsidian issue at all. It looks like you’ve imported actors in from somewhere and whatever tool or module you’ve used to do that has not imported the data correctly.
I’ve written a script that you can run in the console to fix this bad data which should then allow obsidian to perform the migration.
Press F12 to open the console and paste this code into the prompt, then press Enter. After a little while you should see a ‘Done!’ message. Then you can close foundry and re-open it and hopefully obsidian’s migration should then succeed.
(async function () { const updates = []; game.actors.entities.forEach(actor => { if (!actor.items.size) return; updates.push({_id: actor.id, items: actor.data.items.map(item => { if (Array.isArray(item.data.actionType) && item.data.actionType?.length) { item.data.actionType = item.data.actionType[0]; } return item; })}); }); await Actor.update(updates, {diff: false}); console.log('Done!'); })();
-
repo owner - changed status to resolved
- Log in to comment
Can you send me your
actors.db
file?