- Issue created by @jrochate
-
jurgenhaas →
committed b903a9ea on 2.1.x
Issue #3421355: $colorboxAttachment must not be accessed before...
-
jurgenhaas →
committed b903a9ea on 2.1.x
- Status changed to Needs review
11 months ago 11:42am 14 February 2024 - 🇩🇪Germany jurgenhaas Gottmadingen
Thanks for reporting this @jrochate. I've fixed it in the dev release, please review. Not sure how we could have missed that in the first place, that variable never got initialized in the previous code.
- 🇮🇳India Raveen Kumar
@jrochate,
The error message you're encountering indicates that you're trying to access a typed property $colorboxAttachment in the ColorboxFieldFormatter class before it has been initialized. This could be due to accessing the property directly without assigning a value to it first.** To resolve this issue, you need to ensure that the $colorboxAttachment property is properly initialized before accessing it. This could involve assigning a value to it in the constructor or in a method that is called before you try to access it.
- 🇵🇹Portugal jrochate
Thanks 🐛 $colorboxAttachment must not be accessed before initialization Needs review , that quickly solved the PHP error I was getting.
On this use-case I have an entity reference field that links to another entity. When I setup the formatter "Colorbox FF", I get this default options:
Style: Default Link to Content Width: 500 Height: 500 iFrame Mode: Yes
I think that's ok, but when I go to node display, the entity reference field gets the title NOT FROM the referenced node, but from the viewed node itself!
Something like:
Node A has Field X, entity referenced to Node X- Without Colorbox FF, when I view Node A, I see a link to Node X on Field X
- When press on the link, I get a new page with Node X opens- WIth Colorbox FF, when I view Node A, I seed a link to node A on Field X
- When press on the link, I get a black screen with a small X on the cornerIs this the normal module behaviour or is a colateral damage from the fix?
TIA
- 🇩🇪Germany jurgenhaas Gottmadingen
So, the original problem is solved then. The second problem should be a separate issue. It can't be a consequence of the fix because without the fix that module didn't work under any circumstance.
Let's RTBC and fix this one, then we can address the other topic on its own in another issue. But that would require someone to build and debug the code to find out where this is going wrong. I probably won't be able to do that soon'ish as I don't have any site where we're using that module any longer.
- Status changed to RTBC
11 months ago 1:27pm 14 February 2024 - Status changed to Fixed
11 months ago 1:36pm 14 February 2024 - 🇩🇪Germany jurgenhaas Gottmadingen
Thanks. I've just checked, this bug did not exist in earlier versions, it got introduced in the 2.1.x branch only. Marking now as fixed.
Automatically closed - issue fixed for 2 weeks with no activity.