Media library broken for all subsites except primary

When in the media library none of the images show up. If you click one to quick edit nothing shows up. If you click the edit again then the image appears.
If you attach the image to a blog article or use it in the page builder or as featured image you get nothing. Nothing shows up in the admin or the main site sides.

Where it gets wierd is that the main site (side ID 4) all the images are working just fine. Any new site created has the same image problems. The only one that works is the main site.

I have changed themes, disabled all plugins, even cleaned up the database and nothing seems to be working.

I reset the permalinks too.

  • Adam Czajczyk
    • Support Gorilla

    Hello MichaelEPayne,

    I hope you're well today and thank you for your question!

    I would like to investigate it closer but to be able to check it and, hopefully, solve, I'll need a full direct access to the site. Could you please send in:

    Subject: "Attn: Adam Czajczyk"

    - Mark to my attention, the subject line should contain only: ATTN: Adam Czajczyk
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - login URL and admin account login credentials (may be a temporary admin account) data
    - Include FTP log-in details (hostname, username & password)
    - Include hosting control panel access details (login address, username & password) - cPanel's usually the control panel used for this, but your provider may use something else; I'll need this for accessing your site's database, preferably via phpMyAdmin
    - Include any relevant URLs for your site

    Please use our contact form here https://premium.wpmudev.org/contact/#i-have-a-different-question.

    Please also confirm here in a response once the message is sent.

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hello @michaelpayne!

    I think it should be working fine now but please double-check the site, both front-end back-end (all the sites).

    There were two issues with the install that I tweaked to make it work:

    1. Apparently the previously main site has been deleted and the site ID 4 has been set as main new site; That means that the SITE_ID-CURRENT_SITE define in "wp-config.php" should be set to 4 but it was set to non-existing 1 ID (only the "BLOG_ID_CURRENT_SITE" was set but it's a different option).

    2. The .htaccess was slightly messed up. Parts of the code there as well as site's structure suggested that the site was created quite some time ago. However, the .htaccess rewrite rules at the top of the file were incomplete and there was another block of WP native rewrites relevant for newer installs. It wasn't working anyway because it was "too late" in the file so requests didn't even "come to it". So, I have commented out this chunk of code and adjusted the one on top.

    Let me know please if it's all working now.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.