-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assets urls wrong if ... #1566
Comments
Dude, if you define WP_CONTENT_DIR don't you need to also set WP_CONTENT_URL? Just realized this... |
No. |
You are correct! If you don't define the content_url though then the assets will fail as you are getting my friend. You can't just define WP_CONTENT_DIR and expect it to work. ;) |
WP core functionality is working like it should. Your init function is doing things that do not work for non-standard setups |
If you move the WP_CONTENT_DIR then there's no way to detect the new WP_CONTENT_URL. You need to set them both. http://wordpress.org/support/topic/renaming-moving-wp-content?replies=9 Look across the web my friend. You have to define both or the WP_CONTENT_URL is set to the default, which does not exist. |
That is wrong. How would you define an URL that is outside of the path of the vhost? |
Exactly...
Change it to match your needs. |
I do not want to change that. Why would I? |
If the redux folder is not accessible via the web then JS/CSS will never work. If you move the WP_CONTENT folder you have to specify the new URL or again, the JS/CSS will not work. |
The assets are accessible via the normal urls (same as in core) but you use paths to create URLs. |
I'm sorry sir, but I think you don't understand WordPress. You're welcome to fork your own stuff, but this will break things for everyone else. Best of luck. |
You should have a look at how WP core handles wp_content_url and wp_content_dir. URL is not using the dir constant. They are in the standard installation the same at the end but not equal. |
Why is it that plugins using proper core functions handle my config? |
I did some manual massaging and made our path detection much more robust. See version 3.3.6.3. Thanks for the suggestions. I don't think the old way was wrong by any means, but I took what you suggested a bit further. ;) |
See commit: 93a4277 for further details. |
I have 3.3.6.8 included in a plugin, and have an wp installation that has a modified WP_CONTENT_DIR. I am having the problem where the assets url is incorrect for redux. I noticed the code you added in 93a4277:
This code never executes for me; however, if it did, my assets urls would be correct. Is there a way i can make self::$_as_plugin == true when i initialize redux? Or is there some other way that I can make this logic pass? |
I have a modified
WP_CONTENT_DIR
for my wp installation which breaks the framework (as_plugin and is_plugin (packaged)My wp-config.php modifier
resulting in (example from the paid plugin SeedProd Coming Soon Pro):
.... for all the assets
spliting up this broken url:
https://site8.wpmu-trunk.dev/wp-content/
WP_CONTENT_URL (core default) - ok/srv/www/wp-content
WP_CONTENT_DIR (modified in wp-config.php) - WHY?plugins/coming-soon-pro/ReduxCore/*
- okFix started with #1564
The text was updated successfully, but these errors were encountered: