I managed to work around this.
Hello Jatin,
can you please share how did you worked around the issue?
I ran into same issue, basically whenewer I add custom menu to primary arrea I get:
Catchable fatal error: Argument 1 passed to Mlp_Nav_Menu_Frontend::prepare_item() must be an instance of WP_Post, instance of theme_MenuItem given, called in /www/doc/www.vazbalegal.cz/www/web/wp-content/plugins/multilingual-press/inc/nav-menu/Mlp_Nav_Menu_Frontend.php on line 54 and defined in /www/doc/www.vazbalegal.cz/www/web/wp-content/plugins/multilingual-press/inc/nav-menu/Mlp_Nav_Menu_Frontend.php on line 66
Thank you
Van
@vanw.
This message is from a newer version of MLP.
Remove the widget, save sidebar, add the widget again, set your settings and the warning is done, the changes was saved in the database.
Well, no, the problem here is most likely that you are using a theme that in turn uses a custom class with the name theme_MenuItem (there seem to be a lot of themes that do this) that is no extension to the default WP_Post class.
One way to get rid of the fatal error is that we don’t use WP_Post for type hinting our parameter. I first have to check what could go wrong then, though, if anything.
Can you confirm that you indeed use a theme that comes with a theme_MenuItem class?
And by the way, please open a new topic next time. Even though it is a problem related to the Mlp_Nav_Menu_Frontend class, too, this is a different problem.
Thanks @tf for enhancement.
I haven’t got read the message, the important part instance of theme_MenuItem given.