0

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.

Raphael
  • 1
  • 3
  • Sorry, I forgot to mention that the images appear in my uploads file. – Raphael Jan 07 '20 at 09:39
  • 1
    Did you try to switch theme to default one? Is your problem occuring in list or grid view or both and do you have a console error? – gael Jan 07 '20 at 09:51
  • 1
    Fuuuuuuuuuck! list view works... I can't believe I didn't try that. So apparently the problem is only with grid view. I guess it is solved now, although, it's a bit bugging to get this problem. Thank you so much anyway!!!! – Raphael Jan 07 '20 at 10:14
  • If it only works on list view I wouldn't say it's solved :/ Did you try activating the default wordpress theme and see if grid view is loading well? This unanswered question https://stackoverflow.com/questions/29570326/wordpress-media-library-grid-mode-infinite-loading?rq=1 gives some resolutions that worked for others. – gael Jan 07 '20 at 10:38
  • When I switch themes, the grid view works. Weird – Raphael Jan 07 '20 at 10:47

0 Answers0