• Resolved Sibbo100

    (@sibbo100)


    Hi,

    I’ve just installed this plugin on a local site that I am developing and I’m currently getting the following error.

    Warning: Undefined property: stdClass::$attr_title in C:\wamp64\www\RSS-2022\wp-content\plugins\ultimate-member\includes\core\um-filters-navmenu.php on line

    Any ideas what could be causing this, I’m running on PHP 8 and the site I’m building is a rebuild of an existing site which is running on PHP 7 at the moment and plugin seems fine.

    Thank you
    Scott
    The Gate Edinburgh

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Sibbo100

    (@sibbo100)

    Addition: so this now looks like it is a conflict between Ultimate Members and Max Mega Menu plugins, anyone any ideas on how to get around this, it is not an option to use a different menu plugin (max Mega Menu) appears to be one of the best on the market and I’m reluctant to start setting up the members area from scratch when it is supposed to be like for like.

    missveronica

    (@missveronicatv)

    @sibbo100

    I assume the PHP 8 error is on line 23.

    Change the UM Core code like this:

    if ( !empty( $menu_item->attr_title )) {

    Thread Starter Sibbo100

    (@sibbo100)

    Perfect thank you missveronica, that did the trick, had to docotr the description entry too, not ideal if I have to update though 🙁 but at least I know where to fix again.

    Thanks again
    Sibbo100

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Thanks for letting us know how it resolved the issue.

    @missveronicatv @sibbo100 Where has this fix been added to? Is it in UM or Max Mega Menu?

    missveronica

    (@missveronicatv)

    @ultimatemembersupport

    um-filters-navmenu.php:

    foreach ( $sorted_menu_items as &$menu_item ) {
    			if ( $menu_item->title ) {
    				$menu_item->title = UM()->shortcodes()->convert_user_tags( $menu_item->title );
    			}
    			if ( !empty( $menu_item->attr_title )) {  // Mod by me
    				$menu_item->attr_title = UM()->shortcodes()->convert_user_tags( $menu_item->attr_title );
    			}
    			if ( $menu_item->description ) {
    				$menu_item->description = UM()->shortcodes()->convert_user_tags( $menu_item->description );
    			}
    		}
    missveronica

    (@missveronicatv)

    @sibbo100

    In the next UM Update version:

    Fixed: PHP warning when nav menu is empty

    Hi @ultimatemembersupport

    This is still an issue in 2.5 – I still had to apply @missveronicatv’s fix.

    Thanks

    @adamalexanderw

    Thanks for your feedback.

    There were no bug report made at that time but a new one now:

    https://github.com/ultimatemember/ultimatemember/issues/1077

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP 8 Compatibility’ is closed to new replies.