The contents of my media library won't load. I don't even get the empty thumbnails. I just have the wheel that indicates that it's loading but nothing happens.
When I try to upload a file, I get this error:
"An error occurred in the upload. Please try again later."
But, when I check in the wp_posts table in the db, I can see a line with the image (or file) I just uploaded.
I use ACF, Wordpress 5.3, Mamp (free version). I don't have any other plugins installed apart from the basic ones that come with wordpress.
I tried:
- deactivating ACF
- Checked permissions in the db: I have all privileges
- cleaning my functions.php file
- deactivating the custom post types I have
- changing the language of the site from french to english (don't ask me why)
Nothing works.
here is my functions.php code:
<?php function themeStyle(){
wp_enqueue_style( 'myStyle', get_template_directory_uri() . '/style.css');
}
function themeScripts(){
wp_enqueue_script( 'mainScript', get_template_directory_uri() . '/js/script.js', array(),'1.0' , true);
}
add_action( 'wp_enqueue_scripts', 'themeStyle');
add_action( 'wp_enqueue_scripts', 'themeScripts');?>
<!-- Create the items where to publish each new art work -->
<?php
function create_posttype_artwork() {
register_post_type(
'artwork',
array(
'labels' => array(
'name' => __( 'artwork' ),
'singular_name' => __( 'artwork' )
),
'public' => true,
'has_archive' => false,
'rewrite' => array('slug' => 'artwork')
));
}
add_action( 'init', 'create_posttype_artwork' );
?>
Here is my header.php
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta description="Jessica Jaccard, designer graphique à Genève. Graphisme print, animation, web.">
<?php wp_head() ?>
<title>Jessica Jaccard</title>
</head>
<body >
Maybe it is worth noting that I use a different header for front-page.php that I directly include in the page (but more likely it has nothing to do with it).
Thanks a lot for you help.