block-options icon indicating copy to clipboard operation
block-options copied to clipboard

Admin assets not loading correctly

Open godsdog opened this issue 1 year ago • 0 comments

I maybe found a bug in: /includes/addons/styles-manager/blocks/gutenberghub-styles-manager-block.php

There is: public function register() { register_block_type( EDITORSKIT_PLUGIN_DIR . 'build/styles-manager-block.json', array( 'render_callback' => array( $this, 'render' ), ) ); wp_register_script( 'gutenberghub-styles-manager-block-script', EDITORSKIT_PLUGIN_DIR . 'build/styles-manager-addon.js', array(), uniqid() ); }

But this should be use EDITORSKIT_PLUGIN_URL instead of EDITORSKIT_PLUGIN_DIR.

Because of that admin asset is loading like this: https://www.domain.de/srv/www/www.domain.de/htdocs/wp-content/plugins/block-options/build/styles-manager-addon.js?ver=6698e5e09a256

but should be: https://www.domain.de/wp-content/plugins/block-options/build/styles-manager-addon.js?ver=6698e5e09a256

godsdog avatar Jul 18 '24 09:07 godsdog