media uploader on front-end not working

Hey Dominic,

My apologies for the delay. We’re currently traveling for WordCamp US, so I’ll have a look at this first thing when I’m back in tomorrow. Thanks for your patience.

Justin

Hey Dominic,

Thanks for the detailed follow up and thanks again for your patience.

I had a look at the screenshot and it doesn’t appear to be an error, just some sort of logging. We don’t typically see logging in the console like that, so it’s probably coming from another plugin.

Based on the screenshot, the media library interface is loading, so we can rule out a number of things that usually cause that (typically third party plugin conflicts).

The issue appears to be that the media library is sending a request to the server for each item’s data, but isn’t getting a response (or the correct response).

And even stranger: If I then go to the frontend and start the builder I can access the medialibrary with no problems. Strange isn’t it?

Is this only happening if you launch the builder from wp-admin? If so, can you recreate it each time?

Justin

Hello, I am a new customer, just got BB yesterday. All was working well yesterday and now today I am getting this same issue, which is what led me to search your support.

When trying to access the Media Library from any module (slideshow, photo, etc.), I get the infinite loop icon and no images in the gallery shows. I thought it could be because of the size of the gallery, but there are only two photos.

Some background, this is running in a multi-site instance.

Hey Joel,

Can you access the media uploader when on the native WP editor, by hitting the Add Media button? Does this happen only on certain subsites? Do you get the same problem when using the Add Media button on the Text Editor module?

Ben

Actually seems to be working now. I was reading other support areas and found this one, http://forum.wpbeaverbuilder.com/support/search/HTTP+error./, since I was also getting the http error.

We had an outside domain just expire and I removed it and that may have done the trick.

Awesome! Let us know if you need anything further! :slight_smile:

Ben

Hey Justin

Thanks for your answer.

Is this only happening if you launch the builder from wp-admin? If so, can you recreate it each time?

No, it happens if some customers launch the builder from frontend. If I then go to dashboard and access the medialibrary from there, I can see all files in there. If I then switch to the frontend and start the builder from there everything is fine and I cannot recreate the issue…

Thanks
-Dominic

Hey Dominic,

Thanks for the reply. Once you go to the backend and pull up the media library, does that fix it for the customer as well?

It really does sound like something is happening on the server. Something that could be happening in the backend as well, but that hasn’t been experienced since everyone is editing on the frontend.

The reason I’m suspecting this is because we’re not doing anything out of the ordinary with the media library. We’re basically loading it up and letting WordPress take care of the rest. Here’s the code we’re using for that…

PHP:
wp_enqueue_media();

JavaScript:

FLBuilder._multiplePhotoSelector = wp.media({
	frame:     'post',
	state:     $(this).hasClass('fl-multiple-photos-edit') ? 'gallery-edit' : 'gallery-library',
	title:     wp.media.view.l10n.editGalleryTitle,
	editing:   true,
	multiple:  true,
	selection: selection
}).open();

As you can see it’s pretty minimal, WordPress takes care of the rest.

This is also not an issue we’ve ever seen before, so I’m leaning towards it being something with your specific setup.

What appears to be happening is that the media library is opened and a request for the image data is sent to the server. The request either isn’t making it back (e.g. 500 Internal Server Error) or it’s coming back malformed.

If we could recreate the issue, that would be extremely helpful as we could do some diagnosing in Chrome’s Network Console.

Actually, if you do end up seeing it again, before opening the media library, pop open the console and head to the network tab. We’ll want the info for the admin-ajax.php request that is sent right after the media library opens…

Sorry I don’t have a better answer at this time.

Justin