OpenDevelopmentMekong / wp-odm_theme

Wordpress child theme for ODM, based on jeo
https://opendevelopmentmekong.net
5 stars 4 forks source link

Error notice related to odm/menu #1344

Open S-mardii opened 1 year ago

S-mardii commented 1 year ago

On Widget page of PP, there are some error message: https://pp.opendevelopmentcambodia.net/wp-admin/widgets.php

Notice: Function register_rest_route was called incorrectly. The REST API route definition for odm/menu is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see [Debugging in WordPress](https://wordpress.org/support/article/debugging-in-wordpress/) for more information. (This message was added in version 5.5.0.) in /var/www/html/wp-includes/functions.php on line 5835

image

Some resources to look at:

S-mardii commented 1 year ago

@EricSoroos do we expect to expose the odm/menu publicly?

S-mardii commented 1 year ago

There is also a long list of Warning for the Custom Widget to be fixed on this page:

image

S-mardii commented 1 year ago

There is also a long list of Warning for the Custom Widget to be fixed on this page:

image

Based on search through the internet, the issue could be resolved by installing a plugin call Classic Widget.

Source: https://wordpress.org/support/topic/widgets-problem-19/

EricSoroos commented 1 year ago

I don't think that's actually used, I added that originally to get the menu data as json, but then we had to fall back to just scraping the menu html and using the javascript/css directly to make it match the styles. I think we can just drop that REST api end point.

We can also add the classic widget plugin, at least in the current version prior to upgrading to the block editor.

EricSoroos commented 1 year ago

I've added the classic widget plugin to the PP site.