BenAttenborough
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Blocks] All Products block long term cached### WordPress Environment ### WordPress address (URL): https://upnorthcampervans.co.uk Site address (URL): https://upnorthcampervans.co.uk WC Version: 4.8.0 REST API Version: ✔ 4.8.0 WC Blocks Version: ✔ 4.0.0 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.7.3 Log Directory Writable: ✔ WP Version: 5.6 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.12 PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.71.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.6.47-cll-lve Max Upload Size: 2 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ❌ Your server does not support the mbstring functions - this is required for better character encoding. Some fallbacks will be used instead for it. Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 4.8.0 WC Database Prefix: wpuv_ Total Database Size: 1.67MB Database Data Size: 1.46MB Database Index Size: 0.21MB wpuv_woocommerce_sessions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_order_itemmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_actionscheduler_actions: Data: 0.00MB + Index: 0.02MB + Engine MyISAM wpuv_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_actionscheduler_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_commentmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_comments: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_mailchimp_carts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_mailchimp_jobs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_options: Data: 1.21MB + Index: 0.06MB + Engine MyISAM wpuv_postmeta: Data: 0.05MB + Index: 0.03MB + Engine MyISAM wpuv_posts: Data: 0.19MB + Index: 0.02MB + Engine MyISAM wpuv_termmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_terms: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_term_relationships: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_term_taxonomy: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_usermeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_users: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_wc_admin_notes: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wpuv_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_bookings_availability: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_bookings_availabilitymeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_booking_relationships: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_customer_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_order_product_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_order_stats: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wpuv_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wpuv_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM ### Post Type Counts ### attachment: 13 nav_menu_item: 31 page: 8 post: 3 product: 3 revision: 41 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (10) ### Creative Mail by Constant Contact: by Constant Contact – 1.2.3 – Installed version not tested with active version of WooCommerce 4.0 Facebook for WooCommerce: by Facebook – 2.2.0 Jetpack by WordPress.com: by Automattic – 9.2.1 Google Ads & Marketing by Kliken: by Kliken – 1.0.6 Mailchimp for WooCommerce: by Mailchimp – 2.5.0 Under Construction: by WebFactory Ltd – 3.83 WooCommerce Blocks: by Automattic – 4.0.0 WooCommerce Bookings: by WooCommerce – 1.15.31 WooCommerce Shipping & Tax: by Automattic – 1.25.4 WooCommerce: by Automattic – 4.8.0 ### Inactive Plugins (2) ### Akismet Anti-Spam: by Automattic – 4.1.7 Hello Dolly: by Matt Mullenweg – 1.7.2 ### Settings ### API Enabled: – Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: booking (booking) external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #6 - /shop/ Basket: #7 - /basket/ Checkout: #8 - /checkout/ My account: #9 - /my-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: campervans Version: 1.0.0 Author URL: http://www.benattenborough.org.uk/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: – ### Action Scheduler ### Complete: 5 Oldest: 2020-12-12 19:11:55 +0000 Newest: 2020-12-17 14:08:03 +0000 Pending: 1 Oldest: 2020-12-18 14:08:03 +0000 Newest: 2020-12-18 14:08:03 +00003.3.11 here and I also have this problem. I click clean up. It takes me to the plugin page. I click clean up and it pauses for a while as if doing something but afterwards nothing has changed and the clean up prompt still appears on all pages.
Okay I think I have a solution:
WP All Import has it’s own actions which you can hook functions to. By using this you can schedule cron events. (See http://www.wpallimport.com/documentation/advanced/action-reference/).
So I’m experimenting by putting this in my functions.php:
add_action('pmxi_saved_post', 'post_saved', 10, 1); function post_saved($id) { $expiration_date = get_post_meta($id, 'expiration-date', true); if ($expiration_date) { $opts = array(); $opts['expireType'] = 'delete'; $opts['id'] = $id; echo "Setting expiration date for post " . $id . " to the timestamp " . $expiration_date; _scheduleExpiratorEvent( $id, $expiration_date, $opts ); } else { echo "No expiration date set for post " . $id . ". Exiting"; } }The code above fetches the ID of the current post and uses that to get the expiration date.
Provided the post has an expiration date the system will call _scheduleExpiratorEvent which is a function from WP Post Expirator. This in turn with both set the meta and hook to WP’s own cron scheduler, which should then schedule the event.You’ll notice I’m echoing out some messages – these will appear on your import history logs at the top of each import if things are set up correctly.
You could also modify the code above to fetch the expire type meta field and pass it along as an option, if you want to select how the post is expired.
I’ve only done a quick test on this but it seems to work. By the way you can find out if cron jobs have been set with a neat little plugin called WP Crontrol https://en-gb.ww.wp.xz.cn/plugins/wp-crontrol/ I’d recommend it for checking if your cron events have been setup. One tip though cron events will be under tools > cron events and schedules under settings > cron schedules. I found that a little confusing!
Hi, so off the top of my head here’s what I think is happening:
All Import just updates the values in the post expirator fields, but that is not enough to actual set an expiration time with the system.
I believe that when you save the post expirator settings it adds a chron job to the system which is activated at the time you set. But as I said WP All Import doesn’t add the chron job, it just updates the fields.Now thinking about it WP All Import has function editor. So it may be possible to write some code to add a chron job at the same time as updating the Post Expirator fields.
I’m going to have a look into this and if I get anywhere I’ll update the forum.
Forum: Plugins
In reply to: [Mail Bank - #1 Mail SMTP Plugin for WordPress] PHP7 CompatibilityHi, sorry I should have replied earlier. The problem was migrating to a new server (with PHP 7) but the host had blocked the port I needed for Office 365 email. So this was not an issue with the plugin as I originally thought!
Thanks!
Hi all, I’m also having this issue. I’ve got WP All Import to import an expiration date to my posts, but it seems this expiration date doesn’t activate unless I first go into every post and save it first.
Hi latest update seems to have fixed php errors. Well done!
Forum: Plugins
In reply to: [WP Crontrol] Any tips on using with WP All Import?Hi, using this plugin with WP All Import would be very useful for me too. Just a little more information on what the WP Crontrol action name and arguments should be and how they should relate to the PHP code would be useful.
It looks like WP All Import needs two jobs, a trigger script and Execution script as mentioned above. On the Crontroller tools page you can either “Add Cron Event” or “Add PHP Cron Event”.
What confuses me is that WP All Import seems to want to call a URL, but WP Crontrol seems to run a php script? So it’s not clear to me what the action name should be or how to link things up.
@networkhosting Could you give me a few more details about which file you changes and the change you made? I’m only a junior dev 🙂
Hmm, I ended up with a hybrid solution between this and the previously mentioned solution. I found a problem whereby the function was getting the field value before it was being saved.
So for example I had an ‘end_date’ field. If I changed this field and saved the post the post expirator would be updated with the old value. If I saved again it would update with the correct value.
To stop me having to save the value twice I decreased the priority of the add_action function to ’10’ this means the acf_set_expiry function doesn’t run until the filed has been updated:
`add_action( ‘save_post’, ‘acf_set_expiry’, 10, 3 );
Yes, seems to be working as expected now.
Thanks!
I suppose, thinking about it, I could just track specific directories within wp-content instead of tracking all, but I didn’t realise that plugins sometimes add their own directories inside it.
Okay.
I tried fully deleting the plugin and the ngg folder within wp-content and reinstalling. I still get these warnings.
I’ve tried doing this on a fresh install and also get these errors.It should be noted that these errors are PHP warnings. I only see them because I’ve installed query monitor which shows warnings which would otherwise be suppressed. The plugin actually works fine but clearly these little errors may have a performance impact.
The second point is that I *think* it would be better to put the ngg folder either within the plugin folder or within the uploads folder so that by default it isn’t tracked by developers using version control. Alternatively warn users in the documentation (if you don’t already) about the ngg folder and recommend it isn’t tracked.
I see some plugins including ewwww place folders outside their plugin directory. Presumably there is a reason for that, although it seems a bad practice given the version control issue I’ve highlighted – but I’m not an expert so I accept I could be wrong.
I hope that’s helpful.
I think I’ve tracked what might be causing the problem. I use version control for my local install of wordpress. I ignore all plugins apart from my own, but I noticed this plugin adds directories to wp-content directory. I wonder if when I’ve pushed my local install to live if it’s done something with these directories. I’ll have a look and see.
Sure here are a few details, let me know if you want to know anything else. It could just possibly connected to the fact I’m concatenating scripts (with autoptimize) so in the meantime I’ll check that:
WordPress
version 4.5.2
WP_DEBUG true
WP_DEBUG_DISPLAY true
WP_DEBUG_LOG false
SCRIPT_DEBUG false
WP_CACHE true
CONCATENATE_SCRIPTS undefined
COMPRESS_SCRIPTS undefined
COMPRESS_CSS undefined
WP_LOCAL_DEV undefined
Server
software Apache
version 2.4.12PHP
version 5.5.24