You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to use \Carbon_Fields\Carbon_Fields::directory_to_url() with any directory of your theme as parameter
Comments
First, I'm not using this method for any purpose directly on my theme. The problem started after I've noticed my Wordpress wasn't loading any fields on admin, and, when verifying the Console, it is showing 404 errors for some css and js files:
All of them are tried to load directly from the root of my website, instead of loading from theme's Carbon Field. When verifying the source code, I've found that those files are prefixed with \Carbon_Fields\URL constant, which is empty. And, when searching for the declaration of that constant, it uses the directory_to_url() method, which, after some tests, I've noticed that is always returning an empty string.
The text was updated successfully, but these errors were encountered:
Version
Expected Behavior
Calling
\Carbon_Fields\Carbon_Fields\directory_to_url(<dir>)
returns corresponding URL to a directory inside the theme.Actual Behavior
The function is returning an empty string.
Container definition
Steps to Reproduce the Problem
Carbon_Fields::boot()
\Carbon_Fields\Carbon_Fields::directory_to_url()
with any directory of your theme as parameterComments
First, I'm not using this method for any purpose directly on my theme. The problem started after I've noticed my Wordpress wasn't loading any fields on admin, and, when verifying the Console, it is showing 404 errors for some css and js files:
All of them are tried to load directly from the root of my website, instead of loading from theme's Carbon Field. When verifying the source code, I've found that those files are prefixed with
\Carbon_Fields\URL
constant, which is empty. And, when searching for the declaration of that constant, it uses thedirectory_to_url()
method, which, after some tests, I've noticed that is always returning an empty string.The text was updated successfully, but these errors were encountered: