Joomla 5 migration broke my custom fields, anyone else?

maria_lopez

New Member
Messages
66
Reaction score
0
Location
Miami, FL

So I finally bit the bullet and pushed my aquarium club site from Joomla 4.4 to 5.0 last weekend. Backed everything up, ran the pre-update check, no red flags. Upgrade went clean, admin loads fine, front end loads fine.

Then I noticed about 40% of my custom fields are just... gone from the article forms. Not the data, the actual field definitions. The values are still in the database (checked with phpMyAdmin, #__fields_values is intact) but the #__fields table is missing a chunk of rows. Something in the migration nuked them.

I've been rebuilding them by hand for two nights now and it's tedious as hell. For anyone about to do this jump: export your #__fields table separately before you upgrade. The pre-update check didn't catch it and I can't find a single thread about it on the Joomla forums. Am I the only one? What PHP version are you on? I'm running 8.2, wondering if that's a factor. Database is MariaDB 10.6 if that matters.

da_real_mvp

New Member
Messages
69
Reaction score
0
Location
Atlanta, GA

Not just you. Same thing happened to me on a 4.4 to 5.0 jump last month, and it took me WAY too long to figure out what actually happened.

The culprit in my case was plugin ordering during the migration. Joomla runs the update scripts in a specific sequence, and if the Fields plugin gets processed before the com_fields migration script, it can silently drop field definitions instead of failing loudly. No error, no warning, just gone. Check your #__extensions table and look at the ordering column for anything field related, might give you a clue whether that's what bit you.

PHP 8.2 is fine btw, I'm on 8.2 as well and so is half my club's shared hosting. MariaDB 10.6 though... I had weird JSON column handling issues on 10.6 with a different extension, so I wouldn't rule it out entirely. What's your innodb_strict_mode set to? Probably not related but I'm curious now.

Also your advice is dead on. Export that #__fields table separately. I'd go further and say export #__fields, #__fields_groups, AND #__fields_values as three separate SQL dumps before any major version jump. Learned that the hard way.

How many fields are you rebuilding? If it's under 50 I'd honestly just keep hand-jamming them, but if it's more you might be able to reconstruct them from the values table since the field IDs are still in there. Painful either way.

tommy2k

New Member
Messages
69
Reaction score
0
Location
Mexico City, MX

Plugin ordering theory is interesting but I'm not buying it as the main cause. I've done three of these 4.4 -> 5.0 jumps now (two club sites, one side project) and the field loss only hit me on one of them, and that one had the fields plugin disabled entirely at upgrade time. If ordering was the trigger, you'd think a disabled plugin couldn't be in the race at all. Maybe I'm wrong and my sample size is garbage, but it doesn't line up.

What DID line up for me was the MariaDB thing you half-dismissed. That site was on 10.6 and the other two were on MySQL 8. The com_fields migration script does a schema alter on #__fields and on 10.6 with weird collation settings it silently ate rows instead of throwing. innodb_strict_mode was OFF on that box, which is my guess for why it never complained. So if your club hosting has it off by default, that's worth checking before you assume ordering.

Also ngl, "just rebuild if it's under 50" is rough advice. Mine was 31 fields and it still took me the better part of a weekend because half of them had custom display conditions and per-group overrides that I had to reverse engineer from the front end output. Rebuilding the definition is the easy part, remembering WHY you set it up that way six years ago is the nightmare.

Your three-dump tip is the real MVP though. I'd add #__contentitem_tag_map to that list if anyone's using tags heavily, I lost a bunch of those associations on the same upgrade and didn't notice for a month.

You must log in or register to reply here.