The Weirdest WordPress Bug I’ve Ever Encountered…

The title of this post is admittedly vague but I really don’t know what else to say: this is the weirdest WordPress bug I’ve ever encountered.

I ran into an issue today where page meta wouldn’t save, specifically neither my ACF meta nor my Yoast SEO meta. I’d fill out the field, hit update, and the field would be empty, with no reference to it ever existing in the database.

Debugging

I went through the standard debug process and deactivated all of my plugins except Yoast and tried again. Same thing. Deactivated Yoast and activated ACF… same thing.

I started considering that it was my theme. The theme is hand-rolled and uses a well-tested internal framework developed at work, so I was confident that the theme wasn’t the issue. Nonetheless, I switched to a default WordPress theme and tried again.

Same result. What the hell?

I created a new dummy page with dummy Yoast info, saved, and was shocked to see that it had saved correctly. To make sure I wasn’t crazy, I did it again, and experienced the same result: success.

From there, I started comparing the meta between the two posts. The only difference was that the original post had a meta key defining a page template. (I need to point out that this is a new template for an existing WordPress site, so the existing database was duped.)

The page template was for the previous theme. It seemed like a longshot, but I deleted the meta, edited the page, and… violà: my changes saved as expected.

The Fix

To fix/workaround the issue, I deleted all meta entries where the meta_key was _wp_page_template. There were about 50 entries.

Again… What the hell?

I started researching this issue and came across a couple WordPress tickets describing the same issue.

I learned that this bug was originally reported at least three years ago, the first patch was written 17 months ago, and a final patch was accepted 7 weeks ago in the same ticket.

The fix is set to land in 4.2, thankfully!

Long story short, if you’re building a new theme for an existing WordPress site and using a version < 4.2, it’s a good idea to delete the old page template meta when you get to the point that you won’t need it again.

One response to “The Weirdest WordPress Bug I’ve Ever Encountered…”

  1. Salom, yarim yildan beri shu yerda tikaman, shuning uchun bir-ikki og’iz yozay dedim. Ochig’i, avvaliga unchalik ishonmagandim — bundan avval ikkita platformada kechikish bilan azob chekkandim. Bu yerda esa hozircha meni ortiqcha boshog’riq qilmadi.

    O’yinlar soni chindan ham kattagina — men sanamadim, lekin chamasi 5000 ga yaqin. Ko’proq Pragmaticning tanish narsalarini aylantiraman: Sweet Bonanza bilan Gates of Olympus. Play’n GOdan Book of Dead ham turibdi, NetEntning yaxshi slotlari ham uchraydi. Yagona narsa jonimga tegdi — qidiruv filtri anchagina qo’pol ishlaydi, izlagan slotni topmaguncha ancha aylanasan.

    Live-kazino menga ko’proq yoqadi. Evolution Gamingning jonli stollari bor, haqiqiy krupyelar bilan ruletka va blackjack, Crazy Time esa kechalari to’lib ketadi. Internetim shahar sharoitida barqaror, shu sabab lag sezmadim, lekin 4G da goh-goh video sekinlashadi. Yangi kelganlar uchun birinchi to’ldirishga 100 foizli bonus hamda 150 bepul spin beriladi, aylantirish sharti 40x ga teng — rostini aytsam bu yengil shart emas, shu bois men bonusni ko’pincha rad etaman. Deposit qilmasdan aksiyalar ham chiqib turadi, joriy takliflarni 888starz uz da ko’rib olsangiz bo’ladi.

    Registratsiya ikki daqiqada tugadi, minimal depozit kichkina — men 10 000 so’m chamasida boshlagandim. Pul kiritish-chiqarishda karta, e-hamyonlar va kripto ishlaydi. Kripto orqali yechish menda 20-30 daqiqa oldi, kartaga esa bir sutkacha kutdim. Hujjat tekshiruvi so’ralgan edi — pasport surati jo’natdim, tez ko’rib chiqishdi.

    Mobil ilovada o’ynash yomon emas, Android uchun apk saytdan yuklanadi, brauzer versiyasi ham yomon emas. Qo’llab-quvvatlash chatda ruschada 10 daqiqada javob berdi, o’zbek tilida esa har doim ham emas — aynan shu tomoni biroz yoqmadi. Ruxsatnomasi Curacao, demak O’zbekistonda hammasi o’z mas’uliyatingizda — shuni hisobga oling. O’zim oyiga qancha o’ynashimni oldindan belgilab olaman va undan chiqmaslikka harakat qilaman.


Leave a Reply

Your email address will not be published. Required fields are marked *