Benjamin
Forum Replies Created
-
You may need to also update WordPress itself; that method was introduced by WP 4.5: https://developer.www.ads-software.com/reference/functions/get_post_types_by_support/
Hi @moimm
I’ve searched our code to double check and that string of words is no longer in NextGEN anymore. It looks like your site is using NextGEN 1.5.2 which was released in March of 2010 which is quite old! ??
Upgrading to the latest NextGEN version should fix that issue, especially as our slideshows no longer use or require Flash.
Hi @rkwp
It looks like the global
$post
object doesn’t have a “content” attribute; this is probably due to another active plugin or your theme.I will have this fixed with the next NGG release. Thanks for bringing this to our attention!
It’s most likely then a complication with an external object cache; may I ask what other plugins you have active?
As a temporary workaround you could edit that file (nextgen-gallery/non_pope/class.photocrati_transient_manager.php) and comment lines 113 through 122 (the entirety of the
_track_key($key)
method — this makes it so that NextGEN can’t flush it’s transients, but that’s not a major problem as transients will expire eventually anyway.Hi @nosilver4u
Could you try adding this to your wp-config.php:
define('NGG_DISABLE_PHOTOCRATI_CACHE_TRACKER', true);
and let me know if that resolves the issue.
Thanks!
I have found the cause and am uploading an emergency bugfix (NGG version 3.22) right now; check back in 30 minutes or so ??
This does appear to be a problem, I’m looking into it now. Thanks @oestek for bringing this to our attention!
Hi @homu9
NextGEN Gallery groups its transients, so that it is possible to clear just rendered admin page cache without affecting the frontend display caches. Our method for flushing transient groups normally works by directly querying the wp_options table based on the option_name column, but that isn’t available when an external object cache is active like memcache or redis.
So the
nextgen-gallery/non_pope/class.photocrati_transient_manager.php
file maps the group transients in thephotocrati_cache_tracker
option whenever the global$_wp_using_ext_object_cache
variable is true. That tracking transient should only be changed if new transients have been set, but that could still be substantial on a large enough site.There is not presently a method to disable that feature other than editing the above file and commenting line 27. There really should be a way to do so however, so I will add a new constant in NextGEN 3.19 (which should be released on the 19th) that can be used to disable that tracking transient.
My mistake, I meant to write:
nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php
Hi @simon_a6
It’s not currently easily done; you’ll need to:
1. First delete all of your existing images; this will break displaying existing images.
2. Editnextgen-gallery/products/photocrati_nextgen/modules/package.module.nextgen_data.php
and change line 2120 from this:$image_path = path_join($image_path, "{$prefix}_{$image->filename}");
To this:
$image_path = path_join($image_path, "{$prefix}-{$image->filename}");
3. Upload your images again.
I’ve tested this a little and it doesn’t seem to break anything as long you don’t have any preexisting images, but I can’t make any guarantees.
Since it appears that this may actually affect SEO performance I will be adding this as an option to a future NextGEN release. We will likely be releasing 3.18 next week which will not include this, but 3.19 will.
Hi @volghan
To add to that, the
NGG_DEBUG
constant may also be useful to determining what went wrong; just add the following to your wp-config.php:define('WP_DEBUG', TRUE); define('WP_DEBUG_DISPLAY', TRUE); define('NGG_DEBUG', TRUE);
I’m sorry @robertboyl I don’t believe I’m allowed to do that here.
I think however that I can suggest filing another report at https://www.imagely.com/report-bug/ and in the issue description note that this a question for me.
I’m going to mark this as closed again.
I’m good, thanks; just keeping busy ??
That sounds like the code isn’t running at all; do you still have the header comments at the top of the file? They are necessary to make WordPress detect a PHP file as a plugin.
<?php /* * Plugin Name: example.org Site Tweaks * Description: Custom modifications for example.org * Version: 0.1 * Plugin URI: https://example.org/ * Author: Your Name Here * Author URI: https://example.org/ */ add_action('ngg_added_new_image', function($image) { $mapper = C_Image_Mapper::get_instance(); $date = new \DateTime($image->imagedate); $image->alttext = $date->format('F j, Y'); // Image title $image->description = 'Image description'; // Remove this line to use metadata from the image file $mapper->save($image); });
Hi @robertboyl
To move the date to the tile you just need to assign it to the image’s alttext attribute, like so:
add_action('ngg_added_new_image', function($image) { $mapper = C_Image_Mapper::get_instance(); $date = new \DateTime($image->imagedate); $image->alttext = $date->format('F j, Y'); // Image title $image->description = 'Image description'; // Remove this line to use metadata from the image file $mapper->save($image); });
Have done; thanks @robertboyl!