• Hi Pippin,

    first thanks for this plugin which is very helpful for me!

    I used it on my Maps Marker Pro dev site and guess I found an issue: within my pro plugin I use the following code to set a transient:

    $transient_proxy = get_transient( 'leafletmapsmarkerpro_transient_proxy' );
    if ( $transient_proxy === FALSE ) {
    	$rand_number = substr(md5('123'.rand()), 0, 8);
    	set_transient( 'leafletmapsmarkerpro_transient_proxy', $rand_number, 60*10 );
    	$transient_proxy = get_transient( 'leafletmapsmarkerpro_transient_proxy' );
    }

    On the transients overview page of your plugin, this transient gets listet as leafletmapsmarkerproproxy – see screenshot at http://postimg.org/image/a7y2ikeq5/
    As a result, this transient cannot get deleted.

    The expire time also does not seem to be correct. It should be 10minutes and not 1 (I deleted the transient manually via phpmyadmin and recreated it – still showed “expire in 1 minute”).

    best,

    Robert

    https://ww.wp.xz.cn/plugins/transients-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Pippin Williamson

    (@mordauk)

    Hmm, that’s interesting. I’ll see if I can track it down and push out a fix.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    I’ve found the bug.

    I was originally retrieving the name of the transient like this:

    return str_replace( '_transient_', '', $transient->option_name );

    Since your transient included _transient_ in the name, that part was getting removed as well.

    I’ve changed my method to:

    return substr( $transient->option_name, 11, strlen( $transient->option_name ) );

    This works correctly now. I would suggest, however, that you remove _transient_ from the name of your transient since using str_replace is a common method for getting the transient name, so it may cause issues with other plugins in the future.

    Thanks again for the report!

    Thread Starter Robert Seyfriedsberger

    (@harmr)

    thanks for taking a look into this issue and for your feedback – will change the transient with my next update…

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘issue with transient name?’ is closed to new replies.