Dicko Mas Soebekti
Forum Replies Created
-
Problem fixed! Thanks a lot for the help.
Marking this as resolved.Thanks for the tip. I tested by disabling the public, then also admin and helper class, but the issue persists.
I then noticed these lines in class-marketking-core.php file, inside function clear_hidden_products() :$articles = get_posts(
array(
'numberposts' => -1,
'post_status' => 'hidden',
'post_type' => 'product',
)
);
I replaced the “get_posts” query with an empty array, and the issue is FIXED.
I assume that “hidden” is a custom post status registered by the plugin, that’s fine, but I checked at my wp_posts table, there’s 0 post with “hidden” status.
Does this give you an idea what’s going on?Hi,
Unfortunately giving external access to the site is not possible at this point. Let’s continue in this thread and try to resolve this together.
Here’s what I’ve found so far:
- changing to other themes (including default 2023 WP theme) does NOT fix this.
- deactivating all plugins, and only activating WooCommerce and Marketking Core (I assume Marketking still needs WooCommerce activated) does NOT fix this.
- clearing out the content of the files in plugin_dir/public/templates/* (I kept the files, only removed the content of the files), does NOT fix this. My test case was if anything (function, query, etc) in the public facing template files caused this issue, it will resolve the issue if the template file is cleared.
- initial products was 13600, initial product meta was 1222000. Deleting products from database directly (wp_posts and wp_postmeta), down to around 3500 products and 340000 meta, fixed this issue.
Here it is clear that the cause is coming from Marketking Core, AND only in the public side of the plugin, because opening wp-admin pages does not cause any issue.
I tested the public side as logged in user, and also not logged in user from incognito, both result the same issue above.
If you can point me in at least in the most probable cause, that would be helpful.
And in case you need anything (info, test conducting), please do let me know.
Kind regards,
DickoAll good now Stéphane, thanks for the very fast fix. Marking this as resolved.
Thanks,
DickoHi Stéphane,
No worries, if you’ll release it today, I’ll wait for it. Or if you want me to test it first, you can upload it to Dropbox, or Google Drive, etc, and I’ll test it.
Thanks,
DickoJust tested the snippet, yep, that’s it, you’ve found the cause. Now it loads instantly (single post translation or the full list), even with me activating several other plugins, and using my usual theme.
Not sure if this question is relevant in our case, but I found this on SO:
https://stackoverflow.com/questions/24838864/how-do-i-get-pagination-to-work-for-get-posts-in-wordpress
Thanks,
DickoSure! Let me know when you’ve got a pre release version. I’ll test that get back to you.
Thanks,
DickoI’ve tried from the product edit page, on the languages section (right side bar), same result. Also same result when I open this link directly from Falang section in wp-admin:
https://www.mydomain.com/wp-admin/admin.php?page=falang-translation
On front-end side, all is working fine, I can open the English and Indonesian (if available) version of the product.
I checked in SQL, show full processlist, there’s 1 query that seemed to stuck:
SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN ( *lists ALL post ids: page, product, variation, etc, so this is a very long list, spanning several pages of PuTTY screen ) ORDER BY meta_id ASC
I’m not sure where this query comes from (or why), but I can see this might need a long processing time.
Thanks,
DickoForum: Plugins
In reply to: [Empty Cart Button for WooCommerce] Error 404 at cart buttonI got the same issue as this, I see the problem is in detecting the URL parameter. What I did:
in “woo-empty-cart-button.php” file, replace:
if ( empty( $_GET ) ) {
with:
if ( $_SERVER["QUERY_STRING"] == null ) {
And it detects the parameter correctly.
Forum: Plugins
In reply to: [Wallet for WooCommerce] Refund to Wallet not working@subratamal I’m using LiteSpeed cache on a OpenLiteSpeed server, also Redis as object cache. I’ve tried to purge cache numerous times, but it’s still not updating.
Hi @utsacacpit,
Nope, never got any response. In the end I switched to another plugin:
https://www.ads-software.com/plugins/quantities-and-units-for-woocommerce/
It’s an old plugin, but still works fine.
Sorry, forgot to mention, when I tried to detect current location from Safari and it doesn’t work, it didn’t give me any alerts (which I think it should, based on your code?). Could be the laptop though, not sure. But from my laptop, using the same wifi network, it works normally. So definitely not the network.
Thanks.
Hi @pitabas106,
Thanks very much. After some tinkering, I’ve managed to do this on my site. Had to modify autofill.js and checkout-address-autofill-template.php, but now it’s also working for shipping address.
I’ve also duplicated the “detect current location” for shipping address since I love the feature. Let me know if you want me to share the files with you.
However I do notice one small bug regarding detect current location feature. It’s not working on Safari. I haven’t tested it thoroughly, but is it possible that some browsers are not supported? And is there a way to hide the location icon if the browser doesn’t support that feature?
Thanks.
Hi Max,
Yes, I’m using the free version. I do notice that the pro version has captcha feature, but I didn’t want to use that route. I’ve tried implementing captcha before from another plugin, but my users were having problems with that (my users are not very tech-savvy, so I can’t do anything about that except remove the captcha to make it easier for them).
Thanks,
DickoThanks a lot Andrew. I’ll continue from those 2 links you gave me.
Always the best support from you!
Thanks,
Dicko