• Resolved urvishavolcone

    (@urvishavolcone)


    Hello,

    My site suddenly experienced a critical error because of the rtMedia for WordPress, BuddyPress and bbPress plugin. I’m getting this error,

    An error of type E_COMPILE_ERROR was caused in line 225 of the file /nas/content/live/movarahomedev/wp-content/plugins/buddypress-media/app/importers/BPMediaAlbumimporter.php. Error message: Declaration of BPMediaAlbumimporter::create_album($author_id, $album_name = ‘Imported M…’) must be compatible with BPMediaImporter::create_album($album_name = ”, $author_id = 1)

    My site is working fine if I deactivate this plugin, but throwing the error and stops working because of this.

    Can you please check as soon as possible? and get back to me.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • toledogeeks

    (@toledogeeks)

    I am getting this error too. Here is an explanation of the cause and how I will attempt to resolve it until a patch is released.

    The method create_album in BPMediaAlbumimporter class does not match the signature of the same method in the BPMediaImporter class. This mismatch causes a fatal error (E_COMPILE_ERROR) that halts the PHP script execution.

    To correct this error, ensure that the declaration of the create_album method in the BPMediaAlbumimporter class exactly matches the declaration in the BPMediaImporter class, including the order of parameters and their default values.

    To fix the error, adjust the BPMediaAlbumimporter::create_album method to match the parent class/interface:

    function create_album($album_name = 'Imported M…', $author_id = 1)

    Something like that. Test in dev before deploying.

    Steps to edit a file

    1. Open the File: Navigate to /nas/content/live/[domainname]/wp-content/plugins/buddypress-media/app/importers/BPMediaAlbumimporter.php.
    2. Find the Method: Go to line 225 (or nearby, depending on the code) where the create_album method is defined.
    3. Adjust the Signature: Change the method signature to match the parent class, ensuring the order and default values of the parameters align with the BPMediaImporter class.
    4. Test the Changes: After making the changes, test to ensure that the plugin functions as expected and the error does not occur.
    Plugin Author Pavan Patil

    (@pavanpatil1)

    Hi,

    Thanks for reaching out to us.

    Although the error couldn’t be replicated with PHP 8.2, we’ll aim to enhance the given function based on the error log provided. Meanwhile, as previously suggested, please apply the patch. We will plan to address this in an upcoming release.

    Regards,

    Pavan

    coldrealms65

    (@coldrealms65)

    I would liek to report that as soon as i updated to 8.2 i started getting the same error:

    An error of type E_COMPILE_ERROR was caused in line 225 of the file /nas/content/live/ncdcportal/wp-content/plugins/buddypress-media/app/importers/BPMediaAlbumimporter.php. Error message: Declaration of BPMediaAlbumimporter::create_album($author_id, $album_name = ‘Imported M…’) must be compatible with BPMediaImporter::create_album($album_name = ”, $author_id = 1)

    I attempted the fix mentioned above to no avail, though i might not have done it right. I would need instructions like: Go to line XXX That says this (wrong code) and change it to (full correct line of code) if possible please

    Plugin Author Pavan Patil

    (@pavanpatil1)

    Hi,

    Thank you for reaching out to us, and I’m sorry to hear that you’re experiencing issues with the plugin.

    I’ve tested the problem on a fresh site with PHP 8.2 and wasn’t able to reproduce it—https://nimb.ws/RpAr7Dt. If you could provide any detailed steps to replicate the issue, it would be very helpful.

    Since the code in question hasn’t been thoroughly tested, we recommend not updating the files yet. We are actively working on modifying the function to ensure compatibility with PHP 8.2 and plan to release a fix as soon as possible.

    Thank you for your patience. If you have any additional details or questions in the meantime, please feel free to share them.

    Regards,

    Pavan

    coldrealms65

    (@coldrealms65)

    nothing really to reproduce the error other than once we moved to php 8.2 on about every third page load we would get the white “Your site is experiencing a critical error” screen and we would get an email. Within that email is the error code chunk I shared.

    When we disable rtmedia the error stops and as soon as it is reactivated the errors come back.

    Plugin Author Pavan Patil

    (@pavanpatil1)

    Hi,

    We are pleased to announce that we have released a fix for this issue. Please update the plugin to the latest version.

    Thank you for your patience. If you have any questions, feel free to reach out.

    Regards,

    Pavan

    I have installed the update and can confirm that things seem to be fixed.

    Thank you and I will let you know if there are any issues

    Plugin Author Pavan Patil

    (@pavanpatil1)

    Hi,

    Great to hear that the update resolved your issue! I’ll close this ticket.

    If you have any further questions, please feel free to reach out.

    Regards,

    Pavan

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.