Closed valerio-bozzolan closed 2 years ago
Sorry it seems that this is not this plugin fault. It seems that we are using Kirby through the plugin "The Core Plugin" from Quantum Themes.
Plugin Name: Theme Core Plugin
Plugin URI: http://www.qantumthemes.com/
Description: Adds custom type and custom fields capabilities and extends customizer capabilities. Containes Metaboxes and Kirki cutom versions for Themes2Go
Author: qantumthemes
Version: 1.2.8
Text Domain: ttg-core
Domain Path: /languages
Anyway, the bad file is in this position in my filesystem:
.../wp-content/plugins/ttg-core/inc/backend/kirki/core/class-kirki-init.php
And this is the interested part:
...
/**
* Properly set the Kirki URL for assets.
*
* @static
* @access public
* @return void
*/
public static function set_url() {
if ( Kirki_Util::is_plugin() ) {
return;
}
// Get correct URL and path to wp-content.
$content_url = untrailingslashit( dirname( dirname( get_stylesheet_directory_uri() ) ) );
$content_dir = wp_normalize_path( untrailingslashit( WP_CONTENT_DIR ) );
Kirki::$url = str_replace( $content_dir, $content_url, wp_normalize_path( Kirki::$path ) );
// Apply the kirki/config filter.
$config = apply_filters( 'kirki/config', array() );
if ( isset( $config['url_path'] ) ) {
Kirki::$url = $config['url_path'];
}
// Make sure the right protocol is used.
Kirki::$url = set_url_scheme( Kirki::$url );
}
Feel free to close this bug if it's not related to this repository. I will try to contact Quantum Themes in the meanwhile.
Hello and thank you for reporting this issue.
We are closing most open GitHub issues with the release of Kirki 4 to start fresh with this major release.
If you are still running into issues after you have tested your theme with Kirki 4, please let us know so we can reopen the issue.
Please note that Kirki 3 is no longer actively supported. Moving forward, we will only provide support the very latest version of Kirki.
Thank you for your understanding.
Best, David
Hello everybody!
The bug
I noticed that the
Kirki_Init#set_url()
uses theWP_CONTENT_DIR
but this is logically wrong and cause wrong URLs, with stylesheets pointing to404
"not found" pages in certain configurations.To be known: the
WP_CONTENT_DIR
describes the position of the "wp-contents" files in the filesystem, but this has nothing to do with the "wp-content" directory URL.For example this is a very legitimate configuration:
Actual behaviour (wrong, 404 page):
Expected correct behaviour:
See:
https://codex.wordpress.org/Function_Reference/content_url
I'm using the version
1.2.8
(latest one).