jeffgran
Forum Replies Created
-
Yes. My environment is like this:
WordPress lives at
/var/www/mysite.com/blog/The file
/var/www/mysite.com/blog/wp-contentis a symlink to/var/www/mysite.com/releases/20120225/wp-content.So when I deploy a new theme/plugin/etc release, I put it in a new release folder and just change the
wp-contentsymlink to point to the new one.When I view the admin page and look at the source, I see the URL for the JS file is like
"http://www.mysite.com/blog/wp-content/plugins/var/www/mysite.com/releases/20120225/wp-content/plugins/yet-another-related-posts-plugin/js/options.js?ver=3.4.3".To be clear, this isn’t just a problem with YARPP, but a problem with any plugin that uses the
plugins_url()function (and its related functions, likeplugins_dir_url()).Looks like this comes down to a problem with PHP’s
__FILE__, which resolves symlinks and gives the real absolute path of the file instead of the symlinked path of the file. That in turn causes theplugins_url()and related functions to fail in the mode described above.See bug report and discussion below:
+1
I have this exact same problem. Works locally, but after deploying to production, the JS and CSS have mangled paths.
I thought maybe it was a thing where some absolute path is stored in the database but that doesn’t seem to be the case. Don’t know what’s causing it.
I’m not sure if this is the same issue, but I did find a bug where the links were getting cut off, so that the “Linkout” displayed on the tooltip in the Large calendar would only display part of the url. It’s in ec_js.php, around line 400 or so, there is a line that includes
substr($linkout,0,19)which is retarded. No idea what it’s doing there, taking only the first 19 characters of the url. But if you change that to just
$linkoutthe full urls will be displayed.
Edit: by the way, this is in version 6.5.2.2, according to the readme.
Forum: Fixing WordPress
In reply to: Problem with wp_head function (and lightbox)Well, wp_head() adds code to your header for meta tags, script and css links, etc. It’s probably a good idea to have it there, as any plugins that need to add script files to the header use it to hook to and add the necessary code.
To help diagnose the problem, try putting it in and then removing it, and look at the source code of the generated page before and after. By comparing the two you’ll be able to see what code is getting added in by wp_head and thus fixing/breaking other stuff. My guess is that you have a lightbox plugin? and that plugin adds the necessary scripts (prototype and scriptaculous) in the wp_head. That would explain why it only works with that function in.
Hope that helps…