-
Notifications
You must be signed in to change notification settings - Fork 32
Theme Options CSS and JS file URL issue when embedded in a theme #151
Comments
I second this. Redux Framework 4 in its current state cannot be integrated into a theme. Chrome console shows 38 error messages for not being able to include the .js and .css files It tries to load Instead of |
The situation is the same ... I understand it needs to be finalized - Redux_Core::$url Everything worked fine on OPENSERVER , but doesn't work on linux ubuntu server =( Help |
I also encountered this problem, and it was very troublesome. I used xampp to build it locally, but it was the same when using bt.cn to deploy on CentOS8.0. The resource file path was wrong. |
I'm working on it. Trying to root out the cause. For now use TGM to install the plugin. :) |
I did some digging and found the following line: self::$url = trailingslashit( dirname( $theme_info['url'] ) ); That is in the class-redux-core.php file. I tested with: print_r($theme_info['url']); /// {my-theme/inc/admin/redux-core/}
self::$url = trailingslashit( dirname( $theme_info['url'] ) );
print_r(self::$url); //// {my-theme/inc/admin/} And it seems the dirname is somehow removing the last part of the url (at least for me), as I added the redux-core folder in the {my-theme/inc/admin/}, so it becomes {my-theme/inc/admin/redux-core/}. |
to fix just add another dir to your core folder |
Uh oh!
There was an error while loading. Please reload this page.
I embed Redux Framework 4.1.17 in a theme. When I visit the Theme Options page the file URLs to CSS and JS assets are incorrect. They include extra path information instead of only the URL of my website theme.
Is there something I'm doing wrong that could cause this issue? Or, is the free version not able to be embedded in a theme?
Support Hash
Unable to follow link to the support hash page. Link has expired.
Steps to reproduce
Embed Redux Framework 4.1.17 in a theme.
Do not install Redux Framework as a plugin.
Then visit the Theme Options page.
Expected Behavior
I expect the file URLs to CSS and JS to point to my theme folder.
For example: https://domain.com/wp-content/themes/sample-theme/redux-framework/redux-core/inc/fields/slides/redux-slides.css?ver=4.1.16.1598631244
Actual Behavior
The file URLs to CSS and JS assets are incorrect. They include extra path information instead of only the URL of my website theme.
For example: https://domain.com/wp-content/plugins/var/www/vhosts/domain.com/httpdocs/wp-content/themes/sample-theme/redux-framework/redux-core/inc/fields/slides/redux-slides.css?ver=4.1.16.1598631244
Any Error Details (PHP/JavaScript)
Refused to apply style from 'https://domain.com/wp-content/plugins/var/www/vhosts/domain.com/httpdocs/wp-content/themes/sample-theme/redux-framework/redux-core/assets/css/colors/fresh/colors.css?ver=4.1.17.1598636630' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
The text was updated successfully, but these errors were encountered: