Skip to content
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

Resources do not load with custom WP_CONTENT_DIR & WP_CONTENT_URL #10

Closed
ghost opened this issue Apr 29, 2016 · 4 comments
Closed

Resources do not load with custom WP_CONTENT_DIR & WP_CONTENT_URL #10

ghost opened this issue Apr 29, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 29, 2016

Hello,

My wp-config.php is set the following way:

define( 'WP_CONTENT_DIR', '/home/user/webapps/website_sub_assets/w');
define( 'WP_CONTENT_URL', 'https://assets.website.com/w');

And the issue is that the TOC plugin does not load, from what I see, at least one of its resources. Please see the attached file.

toc

If this is of any help, I've found the following report on the issue with a different WP plugin here:

CMB2/CMB2#27

Thank you!

@shazahm1
Copy link
Contributor

@Sthern

Thanks for the bug report. I read thru the comments in CMB2/CMB2#27 but they do not seem to apply. ezTOC already uses plugin_dir_url() and does not use any custom paths like CMB2 needs to. I would expect other plugins not to load assets correctly either if plugin_dir_url() is not returning the correct URL...

What is the URL of the CSS and JS of screen.min.css and front.min.js files? Look in the page source. How does that differ from other CSS and JS files?

@ghost
Copy link
Author

ghost commented Apr 29, 2016

Hello,

Thank you for reply!

Perhaps it would be more effective if I actually mention the name of page. It is the following:

link edited out

Just now, I did the following experiment. I copied the plugin's folder to root WP folder structure location, i.e. to place where it would've resided if I did not tinker with custom locations/subdomains.

Following this, I reloaded the page, and no change occurred—missing icon was still missing.

I then edited wp-config.php, and removed 'WP_CONTENT_DIR' + 'WP_CONTENT_URL' defines—missing icon appeared.

At the moment, I put the defines back, so that the issue can be observed.

@shazahm1
Copy link
Contributor

@Sthern

I looked at the page and the source URL/s are being set correctly. This is not a bug with ezTOC but rather a server config issue. See these links for a solution:

@ghost
Copy link
Author

ghost commented Apr 29, 2016

Thank you for your time!

Will explore the links you provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant