Trying to filter one (of two) Express Details Blocks on the same page as an Express List Block filtering it, getID() on null

So I have hacked together a possible work-around…

I comment out the if open and closing braces lines, so lines 118 and 129 so the if statement doesn’t do the getID() comparison between the two.

I don’t know if this is setting me up for future failures, but this seems to (so far) get me what I want… this doesn’t make a lick of sense as this WORKS on my Dev site using the exact same code (so far as I can tell).

REALLY WOULD APPRECIATE DEV HELP HERE.

To clarify the lines commented out had this content:

Line 118:
“if ($entry->getEntity()->getID() == $entity->getID()) {”

Line 129:
“}”

Sharing this information to help myself as I bet this will come up in the future, or maybe some other poor lost souls that won’t get help with this.

I’d like to point out THIS IS THE EXACT SAME CODE IN v9.X RIGHT NOW (except uncommented).

Really hard to understand the problem without a MWE.

If it works fine on your stage site but not on prod, then there’s some difference between the two that will explain it.

I’d try turning off all caching (especially overrides caching), regenerate the proxies, clear the cache, etc.

You could try cloning the production site so that you can tinker without risking bringing down production.