BuddyDev

Search

Error when saving my gallery settings, for photo

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55612

    I get this error a lot. I think the fallout for photo’s is missing, or there is a function planned there that is not complete:

    
    
    July 6, 2025
    7:19 PM BST	PHP Warning	
    compact(): Undefined variable $
    Plugin: MediaPress
    File: /wp-content/plugins/mediapress-2-newest/core/media/mpp-media-functions.php
    Line: 1157
    
    
    • This topic was modified 1 week, 1 day ago by Venutius.
    • This topic was modified 1 week, 1 day ago by Venutius.
  • Keymaster
    (BuddyDev Team)
    Posts: 25057
    Brajesh Singh on #55615

    Hi George,
    Thank you for reporting the issue.

    I am not sure what version you are using but that file does not have 1157 lines. It has less than 1130 lines in both 1.x and 2.x.
    Are you sure you are referring to the correct file in the error message?

    https://github.com/buddydev/mediapress/blob/2.0-dev/core/media/mpp-media-functions.php

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25057
    Brajesh Singh on #55617

    I can confirm the error reported by you on a different line(1120).

    The solution is to change this

    
    return compact( $title, $content );
    

    to

    return array( 'title' => $title, 'content' => $content );
    
    

    I will be pushing the change soon.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55619

    I’ve updated the file. I’ve performed a few saves, no errors.

  • Keymaster
    (BuddyDev Team)
    Posts: 25057
    Brajesh Singh on #55622

    Thank you George.

    I found another line of code throwing a notice while creating gallery from backend and added a fix. I have pushed these 2 changes to 2.x branch. I have been mostly testing sitewide gallery, will test BuddyPress gallery soon too.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved