Replies
Hi,
Please allow me to look into it and get back to you by Monday. It’s strange behaviour. Are you using any user blocking/exclusion or object caching plugin? Just trying to get some idea.Thank you
BrajeshHi Andrew,
Here are some of my suggestions.1. Instead of the WordPress API, Please use MediaPress API. It will make your job very easy and things will be setup automatically
You can use ‘mpp_create_gallery’ to create a gallery using code. Please search for ‘mpp_create_gallery’ on the forum and you will find many example. Here is one.
$component_id = 3709; $component = 'sitewide'; $gallery_id = mpp_create_gallery( array( 'creator_id' => get_current_user_id(), 'title' => 'some title', 'description' => '', 'status' => 'public', 'component' => $component, 'component_id' => $component_id, 'type' => 'photo', ) );Also, For importing Media to a galelry, we have helper functions like mpp_import_file() , mpp_import_attachment() using which you can import a file from server or an existing WordPress attachment to MediaPress.
Here is the signature for them
mpp_import_attachment( $attchment_id, $gallery_id, $overrides = array() ); mpp_import_file( $file_abs_path,$gallery_id, $overrides = array() );Both the function returns the imported media id or WP_Error object if there was a problem in importing.
Example:-
Import attachment id 32 to gallery id 7
mpp_import_attachment( 32, 7 );That will import the attachment and setup all the properties of media from the given galery(privacy, status, type, component etc).
If you want to override some propert, you can do it by passing 3rd argument. Let us assume that the gallery 7 is public but we want the imported media to be private, It can be easily accomplished by over riding status as
mpp_import_attachment( $attchment_id, $gallery_id, array( 'status' => 'private' ) );Same applies for the mpp_import_file(). You can import any file from server disk. It create an attachment out of the file(Please note that mpp_import_file() only copies the file, does not remove it from the original directory).
If you use these methods, the media will be setup properly and you won’t have issues in listing.
Regards
BrajeshThank you Oscar.
We haven’t been putting the likes plugin as we wanted to push the newer schema first. Our goal will be to push the newer scheam and like in next 3-4 weeks max.
Regards
BrajeshIt is a bug caused by the Essential grid. Please contact Themepunch team and ask that the plugin is not allowing meta to be saved for another plugin using CMB2.
If they say that it is not caused by their plugin, Please point me to the topic and I can prove it for them.
Also, I had a look at the code 2 year ago when Essential grid took down the site of one of my clients(Yes, It loaded 35000 posts while only showing 20). Sorry about this, but I will try to avoid playing with their code again.
That’s good to know.
Yes, I have deactivated it. Please try adding/removing tabs now.
Hi Graham,
The Essential grid plugin is not allowing our post meta to be save. I disabled it and it started working.Most probably the plugin is tainting our data( or I am not sure, is it also using cmb2 and may be causing some conflict)
About the plugins:- The number of plugins won’t be an issue from speed point of view(It depends on how much resource intensive they are) but it is surely problematic while doing updates and all.
I will suggest using a plugin like WP Staging to create/test updates before committing on the site. Also, using a plugin like VersionPress can help you troubleshoot much better in the long term.
Hi Daniel,
I will suggest taking a backup of the database and /wp-content/plugins directory before upgrading. That will allow you to restore.I will also suggest using a plugin like this
https://wordpress.org/plugins/wp-staging/and create a staging site, test the updates there and when everything works properly, You may upgrade the actual site.
Regards
BrajeshHi Graham,
We do have a working version of it and I will push it on github. We wanted flexibility and a lot more options than what RT Media’s addon provides.We used camanjs which works wonderfully for smaller images but when the images get large, this simply does not work. We had to cancel the release at the last minute due to this.
I am releasing this camanjs based version on github(It is working with a lot of effects but only on images 1-2 mb or less).
We have restarted working on what the other plugins provide. The alternative using PHP ImageMagick will be available in 7-15 days. I am not happy with this approach as it has very limited effects but then again, It is to make sure we do have equivalent features to the other media plugin.
I will keep you informed.
Hi Graham,
I have checked it on your site. I see that the saving the settings are not working. It is not saving at all.Since you have got more than 50 plugin there, I am going to try on a local multisite install before troubleshooting there.
I will be posting back in 1-2 hours.
Thank you
BrajeshHi Graham,
Thank you. I am looking into it and will have some info in next 10 -15 minutes.