Page MenuHomeMiraheze

Cargo data is not storing on specific pages
Closed, ResolvedPublic


Example page is Under the "Releases" section, we use Template:Release, which stores the data into the releases table. When I made this edit, which doesn't even touch the Releases section, Cargo removed the row from the releases table (query). At least one other page, The End Is the Beginning Is the End, seems to have the same problem.

I reached out for support from the Cargo maintainers, and was informed the best way to debug this is to use the cargoRecreateData.php maintenance script and see what it outputs.

Could someone run php cargoRecreateData.php --table releases --replacement for me, and let me know what it says? Please contact me on IRC before doing this (nick musikanimal), and make sure I'm around in case we need to take any quick action. The --replacement flag should mean it goes into a replacement table. What I definitely want to avoid is accidentally nuking the whole releases table and not being able to rebuild it.

Thanks for any help you can provide.

Event Timeline

Herald added subscribers: Unknown Object (User), Unknown Object (User). · View Herald TranscriptJul 19 2022, 18:34
Unknown Object (User) closed this task as Resolved.Jul 28 2022, 17:52
Unknown Object (User) claimed this task.
Unknown Object (User) moved this task from Backlog to Short Term on the Technology-Team (MediaWiki) board.

I tried running before, and it errored, then I had to go, but now I realised why it errored, I made a typo in command. Done now, successfully, but the script did output a ton of notices:

Notice: Undefined index: wgCargoLegacyNullLuaFieldsAsEmptyString in /srv/mediawiki/w/extensions/Cargo/includes/CargoLuaLibrary.php on line 94

Thanks! This unfortunately only temporarily solved the problem. Re-saving any of the effected pages again removes the row from the db. I have relayed this information to the maintainer, Yaron, but I need more help debugging what's going during those page saves, and why the maintenance script seems to work without issue. I'll comment here again when I know more.

It's been 6+ months, and I've lost a lot of data. Could someone please run php cargoRecreateData.php --table releases --replacement for solarawiki again?

I may occasionally re-request this, until the underlying issue is actually fixed. The Cargo maintainer has no idea why it isn't working. It seems to be unique to Miraheze.

Could I get this ran again? I just did a bunch of editing that touched a lot of the effected pages.

php cargoRecreateData.php --table releases --replacement on db solarawiki (though you might be using a shared db now?)

Mind you again this seems to be a Miraheze issue. Only N number of usages of {{#cargo_store}} can be used on the same page, evidently. I.e., if I put the code that stores into the releases table at the top, it always saves, but other things (like data in the infobox) won't. This presumably is the same issue as T10793 and possibly other tasks.

If we can't figure out the problem, maybe we can make a custom API entry point or something that runs the above command directly? I'm just trying to think of long-term solutions, as I understand my wiki isn't the only one effected at Miraheze.

Unknown Object (User) closed this task as Resolved.EditedMay 11 2023, 03:52

I've ran the script again so I'm closing this as resolved however, indeed it seems we have an issue with Cargo but I'm not sure why. Our configuration is, for the most part, standard, so it's strange that we encounter this issue. I don't know if it's an upstream issue or just us but this is indeed something we must look into. Unfortunately, none of the SRE team really used Cargo enough to be very familiar with it so we need to familiarize ourselves with how it works in order to debug it best.