Error with Oxygen
-
Hello,
Your plugin is great and works flawlessly on my site, but since I am updating the site with Oxygen, I’ve got an error.
It is caused by a class name issue.
So, when I Add your plugin onto Oxygen I get the following error message:
No ‘llocMslsMslsWidget’ widget registered in this installation
I have narrowed down the error message to the oxygen file in plugins/oxygen/component-framework/components/layouts/widget.php, line 40
This error happens after the following test failed:
if ( $GLOBALS[‘wp_widget_factory’]->widgets[$options[‘class_name’]] ) {
$options[‘class_name’] contains ‘llocMslsMslsWidget’ but there is no such entry in $GLOBALS[‘widget_factory’], here is an excerpt of the var_dump:
‘Akismet_Widget’ =>
object(Akismet_Widget)[724]
….
‘lloc\Msls\MslsWidget’ =>
object(lloc\Msls\MslsWidget)[725]How does oxygen get this class name? They do:
$component_json = file_get_contents(‘php://input’);
$component = json_decode($component_json, true);
$options = $component[‘options’][‘original’];It looks to me that it is an error on their side but on the other hand the problem comes from the headers, when I look in Chrome inspector, I get this:
Request URL: http://my.site/en/welcome/?action=ct_render_widget&nonce=xxxxxxxxxxx&post_id=10973
options: {nicename: “Multisite Language Switcher (#108)”,…}
id: {class_name: “llocMslsMslsWidget”, id_base: “mslswidget”, pretty_name: “Multisite Language Switcher”,…}
model: {dont_render: “false”, placeholder-width: “”, placeholder-height: “”, background-color: “”,…}bottom-unit: “px”
class_name: “llocMslsMslsWidget”
clear: “none”
ct_content: “”So, maybe it is an issue with WordPress, I haven’t digged that far, or with your widget, but I don’t see how. The class name should definitely be ‘lloc\Msls\MslsWidget’ here.
Since I’m not expecting you to remove the namespace, I would understand if you dismissed that issue, but if there is a solution on your side I would appreciate 🙂
ETA: I have opened a ticket on WP bug tracker https://core.trac.ww.wp.xz.cn/ticket/46541
The topic ‘Error with Oxygen’ is closed to new replies.