marcelo2605
Forum Replies Created
-
Forum: Plugins
In reply to: [Pantheon Advanced Page Cache] Set custom Surrogate-Key for custom Rest routeNope. This issue was solved by adding
{cache: 'reload'}to thefetch()request.Forum: Plugins
In reply to: [Pantheon Advanced Page Cache] Set custom Surrogate-Key for custom Rest routeI’ll rephrase the question: I’m adding a Surrogate key to my custom routes this way:
add_filter('pantheon_wp_rest_api_surrogate_keys', function ($keys) {
$request = $_SERVER['REQUEST_URI'] ?? '';
if (strpos($request, '/wp-json/myc/v1/posts') !== false) {
$keys[] = 'rest-post-collection';
$keys[] = 'foo-posts';
}
if (strpos($request, '/wp-json/myc/v1/search') !== false) {
$keys[] = 'rest-post-collection';
$keys[] = 'foo-search';
}
return $keys;
});And I’m using the function
pantheon_wp_clear_edge_keys()to clear the cache inside thesave_posthook.$keys = ['foo-posts', 'foo-search'];
$keys = pantheon_wp_prefix_surrogate_keys_with_blog_id($keys);
pantheon_wp_clear_edge_keys($keys);These routes are called through JavaScript using
fetch(). But even after editing a post, the page still consumes the cached version.- This reply was modified 8 months, 1 week ago by marcelo2605.
@baljitdhanjal The notice is thrown when I run this line on my code:
apply_filters('get_the_excerpt', $post_object->post_excerpt, $post_object);Investigating the plugin code (I’m using version 2.0.4), I found the functions
ctl_excerpt_moreandctl_excerpt_lengththat getpost_typefromglobal $post.But sometimes, the
global $postare empty. So maybe you can change this:if ($post->post_type == 'cool_timeline' && !is_single() ){for this:
if ($post && $post->post_type == 'cool_timeline' && !is_single() ){in both functions.
This changes remove the notice for me.
- This reply was modified 5 years, 7 months ago by marcelo2605.
Forum: Plugins
In reply to: [Claudio Sanches - PagSeguro for WooCommerce] Erro 53015Oi @michelsaguiar estou tendo o mesmo problema. Parece que ele acontece somente com compras de PJ. Você conseguiu resolver?
Forum: Plugins
In reply to: [YITH WooCommerce Wishlist] Table name used by the pluginThanks for the support!
Forum: Plugins
In reply to: [Melhor Envio] Endereço de entrega ao invés de cobrançaMesmo problema por aqui também. Versão 2.6.2.
Forum: Plugins
In reply to: [Theme My Login] Add custom error message to login formThanks! I also got the same result with a more verbose solution:
$errors = new \WP_Error; $errors->add('message', $message); $form = tml_get_form($form_name); $form->set_errors($errors);Problem fixed: I added my email address as my name on this Twitter account and leaved email field empty.
Hey @laszloszalvak
I opened a ticket. Thanks for the reply.
Hey Eva, problema fixed!
I’m using a plugin called Soil (https://github.com/roots/soil) and it have a module to create relative URLs. A just disable this module and works.
Thanks 😉
Yes, the g:image_link in mapped to Main image attribute. I keep this as default. But the domain is not added to link.
Is possible to add the domain in the prefx field?
Mesmo problema por aqui. O PagSeguro não está conseguindo notificar o site.
Hello, thanks for the reply. Yes, I’m using free version.
My website is not published yet.
Actually, I’m using lang value in CSS, to create a selector for styling current language, like
:lang(pt-BR) .language-selector a[title="Portuguese"]Nice. Thanks for the explanations @wfalaa.
Forum: Plugins
In reply to: [Theme My Login] Custom login template with Sage 9 theme?@the_lar, have you found a way to put the TML template files inside the
resources/viewsfolder?