Hi there, I want to report a bug regarding transients not working properly for multiple mashup groups.
Reason:
Transient name is generated like this for every mashup group.
// class-gmb-mashups-builder.php on line 543
$transient_name = 'gmb_mashup_' . $post_type . '_' . md5( http_build_query( $args ) )
// example output: gmb_mashup_customer_840uakdjfoi498
If you use multiple mashup groups on the same map like me, the transient name will be the same for each transient therefore overwriting each other.
Solution:
Solution is fairly simple, just append a unique id to transients.
You can also replace the md5 hash with uniqid if your intention was to use the md5 hash as unique id (what's not the case, since arguments can be the same for multiple mashup groups).
// class-gmb-mashups-builder.php on line 543
$transient_name = 'gmb_mashup_' . $post_type . '_' . md5( http_build_query( $args ) ) . '_' . uniqid();
// example output: gmb_mashup_customer_840uakdjfoi498_484048
Hi there, I want to report a bug regarding transients not working properly for multiple mashup groups.
Reason: Transient name is generated like this for every mashup group.
If you use multiple mashup groups on the same map like me, the transient name will be the same for each transient therefore overwriting each other.
Solution: Solution is fairly simple, just append a unique id to transients. You can also replace the md5 hash with uniqid if your intention was to use the md5 hash as unique id (what's not the case, since arguments can be the same for multiple mashup groups).
Please add this to the core.
Thank you,
Tobias