MG 2.0 InvalidArgumentException: Accessed unknown getter 'GalleryMedia'

Pur3x

Active member
When i uploaded a couple images and i checked admin panel and i saw a few error messages with.

Code:
InvalidArgumentException: Accessed unknown getter 'GalleryMedia' on XF:Post[231]
src/XF/Mvc/Entity/Entity.php:179
 
I generally can't see how this can happen.

The "GalleryMedia" getter is only attached to posts (as indicated in the error) so it's not directly related to uploading images.

However, it is called from within the post template. Could these errors actually have occurred while the add-on was in the process of being upgraded?
 
Do the times of the error more likely correspond to when you installed it, though, rather than when you uploaded the images?

Are you able to share the full stack trace of the error?
 
Do the times of the error more likely correspond to when you installed it, though, rather than when you uploaded the images?

Are you able to share the full stack trace of the error?
 

Attachments

  • errors.webp
    errors.webp
    21.9 KB · Views: 14
  • errors2.webp
    errors2.webp
    68.1 KB · Views: 13
  • errors3.webp
    errors3.webp
    57 KB · Views: 15
Last edited:
It doesn't appear to be what I originally thought it was. It looks like the issue keeps recurring.

Given that it appears as though there could be other add-ons at play here, would you mind disabling any add-ons which extend the post functionality and seeing if the error stops being logged?

I'm not sure which add-ons you have installed, but the error message does suggest that Reactions is installed. It's possible there's a conflict here.
 
These are the addons i currently have.I went ahead and disabled reactions, as it looks from the image errors3 it has to do with reactions ?
 

Attachments

  • addons.webp
    addons.webp
    56.7 KB · Views: 16
Does the error keep getting logged and does it seem to be reproducible when you visit the same posts?

If so, could you disable all add-ons except XenForo Media Gallery and see if the problem stops?
 
Alright seems like the errors stopped getting logged after i disabled these addons, it could probably be reactions not sure.
 

Attachments

  • addons1.webp
    addons1.webp
    55.1 KB · Views: 14
That would seem most likely. You might be able to verify by just re-enabling that one.

If it does turn out to be a specific add-on, please report it to the developer. It will likely be something they need to fix (my suspicion is an improper extension of the Post entity structure).
 
Back
Top Bottom