35

WordPress related, get ready for some disgust.

So today early in the morning my boss forwarded me an email from a client, it was about a bug, and asked me if I can have a look at it and fix it.
"Yaay, WordPress!" I thought and opened the page containing the mentioned bug. She wrote that in the italian version of the page, users can select dates in the calendar, which should be disabled, like in the german version.

So yeah, I opened the code. Everything in the function looked perfect. Really. And the Data was also correctly set in the backend of WP.

The function was only 3 lines of code:

- Get the german post ID of the current post (german or italian) by its ID (using a Polylang function)

- Get an Advanced Custom Fields field by name and from a post with the ID from before

- json_encode its content and echo it to a JS var for initialization and later use in some AngularJS.

No fucking missing semicolon, it was fucking perfect like a sunset with your soulmate.

So I tried to find the bug with my personal way of debugging:

"Shitstream Debugging"
When a creek suddenly is full of water mixed with shit, walk upstream through the turds until you reach clear water. This is where the bug is.

=> So I first looked at the HTML source: Turds.
=> Then the ACF field content: Still turds.
=> Then the ID of the german post: Shit stain and turds (var_dump: null)
=> Please god at least $post->ID? Nope, fart smell and turds.
=> Nothing more to check: Clear fucking water and the flowery smell of 99 devVirgins

So it replaced $post->IT with get_the_ID() and it worked like a charm.

Afterwards I feel stupid, but $post->IT worked all the times before...

Conclusion:
FUCK YOU WORDPRESS YOU UGLY PIECE OF HUMAN-CENTIPEDE-PROCESSED-DOGFART.

Thanks for your patience.
Only one beer was sucked dry during the writing of this fucking rant.

Comments
  • 2
    Well, you did find the bug so hats off to you sir :D
  • 2
    I'll play Google here and ask: Did you mean $post->ID?

    I fucking hate WordPress with a passion. I get your frustration.
Add Comment