Fixed Media rebuild error message

MySiteGuy

Well-known member
The latest version of XF 2.1, used with the latest XF Media.

I get this during the rebuilding process after an import from VB 5.2.1 and Photopost Pro.
Fatal error: Cannot use XFMG\Entity\MediaItem as MediaItem because the name is already in use in public_html/forum/xf/src/addons/XFMG/Job/MediaRatingRebuild.php on line 6

The forum has about 100K posts, about 32K images in the gallery.
 
This is probably a bug, but you can sort that by editing src/addons/XFMG/Job/MediaRatingRebuild.php.

Find and remove this from line 6:
Code:
use XFMG\Entity\MediaItem;
 
Thanks. Will do that. I had thought about trying that so it wouldn't be declared twice during execution, but I wasn't sure if it wasn't going to break anything since I'm not familiar with the core code in the Media Gallery.
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XFMG release (2.1.2).

Change log:
Prevent error when rebuilding media item ratings due to a conflicting class alias.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom