According to the documentation, it appears that you need the trailing slash on the URL. Have you tried that?
Thread Starter
B
(@bh8489)
Really appreciate it, Christiaan. From what I’m seeing, the trailing slash doesn’t matter.
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/contenta' );
define( 'WP_CONTENT_URL', 'http://'.$_SERVER['HTTP_HOST'].'/contenta/');
yields a content_url() of http://www.domain.com/contenta/ (correct) and a plugins_url() of http://www.domain.coms (incorrect).
I also tried
define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plug' );
define( 'WP_PLUGIN_URL', 'http://'.$_SERVER['HTTP_HOST'].'/wp-content/plug');
both with and without the content folder changed. content_url() remained consistently correct. plugins_url() was http://www.domain.comg. Then I added a trailing slash, and the plugins_url() was http://www.domain.com/. In both cases, the plugins_url() should have been http://www.domain.com/wp-content/plug.
Any other thoughts? Much needed, much appreciated. Thanks.
Have you tried disabling all plugins? I’m wondering if there’s something causing a conflict.
Thread Starter
B
(@bh8489)
Thanks! I had done that a little before receiving your suggestion, and yes, that was the right action. Turns out domain mapping is the culprit, and I’m not the only one experiencing this. Useful articles:
http://wordpress.org/support/topic/plugins-urls-broken-with-different-wp-content-dir?replies=8
^ I tried the suggested fix here, and it definitely changed things, but had other erotic behavior, like plugins_url() returning http://domain.com/content/plugins/full/server/path/to/plugin/file/thenfinallythefile.js. So that didn’t work. I also tried putting the WP MU Domain Mapping plugin in mu-plugins; also didn’t fix it.
http://wordpress.org/support/topic/plugin-wordpress-mu-domain-mapping-problems-with-custom-wp-content-directory?replies=6
^ Haven’t gotten to try this one yet
Patterns I’ve noticed so far:
When seeing the bad plugins_url()…
1. Disable all plugins except the domain mapping plugin using the bulk checkboxes.
2. Then, disable the domain mapping plugin last, also using the bulk checkbox (it doesn’t seem to work reliably when just clicking Network Disable / Disable).
3. Set wp-config.php the way you want it.
4. Reenable all plugins except domain mapping, then, after, reenable domain mapping.
This seems to work temporarily, but then reverts to not working randomly. Changing wp-config.php seems to force it back to not working, then you have to repeat these steps. Obviously this is hardly a fix, just a pattern I’m seeing so far.
Its looking like there’s no known generic fix for this, so I think I’m going to have to come up with something on my own. Suggestions still very welcome; I’ll post back here if I figure anything out.
Thanks!
I just want to clarify: you found the source of the issue, and your site is working again, but the Domain Mapping plugin doesn’t work properly?
If so, I’d suggest hopping over to the support forum for the plugin and seeing if somebody has a solution there.
Thread Starter
B
(@bh8489)
The source of the issue is the Domain Mapping plugin, yes. I have not yet found a fix for it but I’m working on that. I will continue in the support forum there, but I’ll update this thread with a solution if/when I find one, incase in the future somebody else like me sees this issue but doesn’t recognize it as being caused by the plugin.
Thanks!
Did you find a solution for this problem with the domain mapping plugin?
Best Regards
If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else’s topic.
I am now closing this 3 month old topic as it references an older version of WordPress.