All the images using [rtmedia_gallery global="true" media_type="photo"]

Hi there,

Just wanted the gallery to pull the images of everybody. I know it is not possible out of the box, so i explored the code. Guys the code you wrote is really messy!! And for the god’s sake RTMedia.php is written by Faishal RTMediaQury by saurabh and RTMediaModel by joshua. Well no wonder that there are some functional bugs if parts of a function will be coded from so many people.

Now if i comment out line 98 in RTMediaModel.php then the gallery shows all the images uploaded by any user. As a bonus “load more” button becomes even in chrome functional. So it is not impossible, you just have a bug in the code.

After the above modification [rtmedia_gallery global=“true” media_type=“photo” media_author=“4”] shows only images of user 4, so i think it functions just as you planned.

Do you think it is a good solution for the bug or are there bad side effects of it?

Installed WP on another server. Setup everything the same as on the other one.
And rtMedia is working fine out of the box without modification. It seems there are server specific settings that can prohibit rtMedia working fine.

What are the exact requirements on the server?

Hi Bankuti,
Can you please check rtMedia on your old setup with other plugins disabled and with default WordPress theme? rtMedia works on WordPress so there isn’t any server side requirement.

Line no. 98 in RTMediaModel.php file is the where condition for SQL query to fetch media. You can’t just comment out that line and on which page you got “Load More” button not functional?

So i face the problem on a Multisite installation of WP 3.9.1. Disabled all the plugins, except for buddypress and rtMedia. Set the theme to twentyfourteen. Am still facing the issue, but everything seems to work right when i comment out that line. Pretty strange…
This occurs on a server with PHP 5.2.12-2 with suhosin patch 0.9.7 and MySQL 5.0.51a-14.

The other server os PHP 5.4.4 and there i have the exactly same settings and do not face the problem. Luckily enough this will be the production server the one before was just for development.

I simply just do not have any idea why it happens?

So you are getting different results on both of your site for this shortcode [rtmedia_gallery global=“true” media_type=“photo”] right?

This shortcode will by default load public media from all the user.

Can you tell me what exactly the output you get and what output you are expecting?

Made some screenshots.

Attachment Link(s):

http://rtcamp.com/wp-content/uploads/rtMedia/topics/66677/2014/06/modified.jpg

http://rtcamp.com/wp-content/uploads/rtMedia/topics/66677/2014/06/original.jpg

Actually using the original code only one image gets rendered in latest chrome and even in IE11. In IE11 i can load more of my (but only mine) images by clicking on the “load more” button, however chrome just hangs when i try it. So what happens in chrome i will be shown only one of my own pictures. Can not even get my other pictures. Period.

By commenting out line 98 all the images of every user will be shown (actually initially only 10) but i can load in the rest by clicking on the button even in chrome. I did not test&try all the other functions after commenting out, but it seems so that it just solves the bug of showing only 1 image both in chrome and IE11 and additionally makes the load more button functional.

Can not explain it more in details and find it strange. Even more confusing to me that on the other server (hosted by the same company) everything works as it should without modification.

If you comment out line no. 98, none of the SQL where condition will apply and in return all the media from all the user will load irrespective of media privacy and media author. You can’t just comment out that line.
As I stated earlier this gallery shortcode will only load media with privacy set to public. Please check media privacy of all the media.