Open bryanpaulmiller opened 4 years ago
I second this. Redux Framework 4 in its current state cannot be integrated into a theme. I had redux 3.x directly integrated into my theme for years. Now I upgraded to redux framework 4 and I get the same issues. All css and js files use the wrong path. They use the absolute server path to the files instead of the the theme directory.
Chrome console shows 38 error messages for not being able to include the .js and .css files
It tries to load
https://example.com/wp-content/plugins/srv/users/example-site/public_html/wp-content/themes/mytheme/redux-framework-4/redux-core/inc/fields/switch/redux-switch.min.js?ver=4.1.21
Instead of
https://example.com/wp-content/plugins/themes/mytheme/redux-framework-4/redux-core/inc/fields/switch/redux-switch.min.js?ver=4.1.21
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. :)
Hey all, I also just tried now to embed the latest plugin version redux-core folder into my theme. I am getting a similar error but slightly diff. See attached image.
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
e.g if your current Redux dir be:
/lib/
make it:
/lib/sub/
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.