Answer the question
In order to leave comments, you need to log in
Why did the Carbon Fields library stop displaying image previews in the Image field in the WordPress Admin?
Greetings. Recently completed another pulling of the site on the WordPress admin panel. This is my second time using the Carbon Fields library. It is a library, not a plugin, i.e. I put the Carbon Fields folder in the theme folder, and also include the necessary files in functions.php.
Faced with an unexpected moment - when transferring to another domain, previews in the image field stop loading. Rather, if you select a file, they will be loaded (the data itself is even saved and subsequently displayed without problems), but when updating the post, the preview itself is not saved.
What could be the matter and how to solve the problem?
I look forward to your answers. Because I don't know how to solve the problem myself
Answer the question
In order to leave comments, you need to log in
I figured out what the problem is!
The .htaccess file is to blame. Rather, the variables RewriteBase
were RewriteRule
with a subfolder (because I do all the work on my hosting and create a folder for each individual one), and after the transfer, there was no subfolder in the URL. Accordingly, I replaced the values \u200b\u200bof these variables with the necessary ones and everything worked.
To make it clearer, I'll do this.
Here is a listing of the old .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /acrobatics/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /acrobatics/index.php [L]
</IfModule>
# END WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question