meenie/munee

Image Issue with Wordpress.

archergod opened this issue · 10 comments

I just try this with a wordpress installation. It works fine, except that when a Admin is logged in and view the front page, then in admin bar, Wordpress logo and update icons goes missing. they use a query string by wordpress.

Could you please give me an example of the URL path wordpress is using for images that you are having an issue with?

I did some more research on this, I found that munee is actually changing the path in CSS

in wordpress: background-image: url(../images/menu-shadow.png); is the actual style sheet and
munee makes it : background-image:url(/wp-admin/images/menu-shadow.png)

now since my wordpress is install in a folder [in development server], /wp-admin is looking on web root, where it doesn't exists and hence icon is not visible. It is same/related error to css path error ...

If it's not finding the webroot properly, then you need to define WEBROOT before you include the composer autoload file. Something like:

define('WEBROOT', __DIR__);

Let me know if that works out for you.

I have that define('WEBROOT', __DIR__); in my code and when I print it print : D:\phpsites\weather\wordpress as path. This path is indeed where my wordpress is and my webroot directory for domain is d:\phpsites, so wordpress is in 2 folder deep.

I think we need a WEBROOTURL like variable that you can use with absolute path calculation to ensure complete safety.

if that matter, I am using default wordpress, you can install it in subfolder and test, they are not using combine request. And again if it is for combine request, then maybe you should not parse url if it is not combine request. just a thought.

If your webroot is D:\phpsites\ then why not try:

define('WEBROOT', dirname(dirname(__DIR__)));

now all js and css gives Error: File does not exist: /wp-content/themes/weatherme/js/easyResponsiveTabs.js as they cannot find that file in d:\phpsites\

What is the exact file path to the webroot of your application?

My apache is configured for D:\phpsites, URL: http://localdomain/ and my wordpress is installed in D:\phpsites\weather\wordpress having URL : http://localdomain/weather/wordpress.

@archergod, I've simplified the relative path conversions which might help with your issue. I'm going to close this, please feel free to open it back up if you are still having issues.