fix broken substr return in replacements.php #65
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Adrian Happy Holidays,
Here is a pull request to fix the currently broken the {substr.{replacement}} code.
Also I think you should rethink the replacement caching because I had to hack my theme's functions.php with the following just to to deal with stale replacement values:
function disable_replacements_cache_for_form_page() { wp_cache_set( 'last_changed', microtime(), 'groundhogg/replacements' ); }
add_action( 'groundhogg/replacements/init', 'disable_replacements_cache_for_form_page');
Admittedly I was using {substr.{replacement}} on {GET.url_param} I don't think my use case is too unique.
Hopefully this can get merged into the main branch soon so I don't have to use a hacked plugin for too long in production.
Also as you don't have a public repo for the groundhogg contracts plugin I'm posting a screen shot of the edit required to fix the print button to work. It look like JQuery was not getting loaded so I added the wp_enqueue_script for it.
I hope you can get this added to your non-public repo. Thank for the great product.
-Daniel