bigtomato
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Category Colors Migration Help Link BrokenThank you, it’s working now.
Forum: Plugins
In reply to: [The Events Calendar] How to Disable Onboarding Wizard?Hi, this had a typo, missing the second quote after ‘tribe_onboarding_disable
The correct code is: add_filter( ‘tribe_onboarding_disable’, ‘__return_true’ );However, after fixing it didn’t work for us anyway. We figured out another way around this.
thank you.Forum: Plugins
In reply to: [WP Activity Log] update 5.3.4 undoes domain mapping for multisitesHi Lucian, this doesn’t appear to be fully fixed yet. We updated the plugin on a dev server with strict reporting, and an MU monitor to log switch_to_blog()/restore_current_blog() usage and detect unbalanced blog context switches.
The error:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed
Upon tracing, we confirmed the call originates from:
wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php(804): switch_to_blog()It appears that do_action(‘switch_blog’, …) is being fired without the second $prev_blog_id argument, which is expected by WordPress core and any listener using the documented signature.
To fix, please ensure any use of:
do_action(‘switch_blog’, $blog_id); // ❌
…is updated to:do_action(‘switch_blog’, $new_blog_id, $prev_blog_id); // ✅
We’ve mitigated the issue by hardening our MU monitoring plugin to use a default for the second argument, but this should be addressed upstream to avoid breaking other well-behaved listeners.
Let us know if you need our error logs or test case.
Also, we have only ever installed wp-security-audit-log on a network activated basis, never site-by-site, so you may need to check that again. We’re running on a Multisite subdomain structure.
Thanks for being so responsive about this.Forum: Plugins
In reply to: [WP Activity Log] update 5.3.4 undoes domain mapping for multisitesLucien, thanks for the patch, but I don’t think it’s quite fixed yet. We installed the 5.3.4.1 patch on a dev server with Strict error reporting and an MU monitor checking for correct blog switching. It appears that the
switch_bloghook is being called with too few arguments.
The error:PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed
Upon tracing, we confirmed the call originates from:
wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php(804): switch_to_blog()It appears that do_action(‘switch_blog’, …) is being fired without the second $prev_blog_id argument, which is expected by WordPress core and any listener using the documented signature.
To fix, please ensure any use of:
do_action(‘switch_blog’, $blog_id); // ❌
…is updated to:do_action(‘switch_blog’, $new_blog_id, $prev_blog_id); // ✅
We’ve mitigated the issue by hardening our MU monitoring plugin to use a default for the second argument, but this should be addressed upstream to avoid breaking other well-behaved listeners.
By the way, we’ve only ever had this plugin Network Activated, never site by site, so you might want to check that again. We use the subdomain Multisite structure. Let us know if you need our error logs or test case.Thanks again for addressing this so quickly.
Hi Brandi, That fixed the domain resolution problem, which on our end seemed to be the main problem.
We do use Cloudflare for all domains, which probably makes it more complicated. At first we thought we might have to clear 250 websites’ CF cache manually, but clearing cache at the server level fixed the problem. We use Cloudways for hosting.
Did you experience data issues?Happened to us as well. Seemed like such a minor update that we did not test it first. Won’t do that again. We had 250+ websites redirecting to the root site, and dozens of upset clients calling and emailing until we deactivated the plugin. Something in the update caused WordPress to redirect everything back to the root. In the response headers X-Redirect-By was set to WordPress, and the Location was set to the multisite root domain url. Deactivating the plugin and clearing the server cache fixed the issue.
- This reply was modified 1 year, 1 month ago by bigtomato.
Forum: Plugins
In reply to: [The Events Calendar: Category Colors] Category Colors Are Not SavingThank you Gustavo! I tested on a Staging site after reapply latest Events Calendar and Events Calendar Pro updates and it works great! Nice to start using the new interface!
Forum: Fixing WordPress
In reply to: multisite deployment fails, but no log file generatedThat’s your problem – your http_host header can’t be detected.
From chatgpt:
In a single-site configuration, WordPress doesn’t rely on
HTTP_HOSTand other array keys to the same extent as it does in a multisite setup. Here’s why the issue is specific to multisite mode:- Multisite’s Dependency on
HTTP_HOSTfor Domain Mapping:- In a single-site setup, WordPress primarily uses the
siteurlandhomeoptions from the database to determine the site’s URL. It doesn’t need to dynamically map multiple domains or subdomains, soHTTP_HOSTis not as critical. - In a multisite environment,
HTTP_HOSTis crucial because WordPress uses it to identify the correct subsite based on the incoming request’s hostname. Without this information, it can’t map the request to the correct subsite, leading to PHP warnings and failed requests.
- In a single-site setup, WordPress primarily uses the
- Increased Complexity of Multisite Network Configurations:
- Multisite setups introduce more complex routing rules that require PHP to access and interpret incoming headers to route users to the right subsite or subdirectory. The configuration of
ms-settings.phpand other WordPress core files relies heavily onHTTP_HOST,REQUEST_URI, and sometimesHTTPSheaders to function correctly. - When these headers are missing or not populated correctly, the multisite configuration cannot route requests properly, resulting in 502 errors.
- Multisite setups introduce more complex routing rules that require PHP to access and interpret incoming headers to route users to the right subsite or subdirectory. The configuration of
- Canonical Redirects and URL Rewriting:
- Multisite networks need to handle canonical URLs to enforce consistent URLs across the network, which is managed in
canonical.php. These canonical redirects rely onHTTP_HOST,REQUEST_URI, andschemeheaders to determine the correct URL structure. - Without these headers,
canonical.phpcannot correctly form URLs, triggering undefined array key warnings and causing the server to drop requests, which often leads to a 502 error.
- Multisite networks need to handle canonical URLs to enforce consistent URLs across the network, which is managed in
- Server Configuration Requirements for Multisite:
- Multisite often requires specific web server configurations or proxy settings to handle and pass headers properly, particularly in environments using load balancers or reverse proxies (common in GCP). In a single-site setup, these specific configurations are usually not as necessary.
- If your server or load balancer configuration doesn’t account for the multisite requirements (such as forwarding headers like
HostandX-Forwarded-Host), the environment won’t work as expected when switching to multisite.
- Dynamic Path and Domain Resolution:
- Multisite mode introduces dynamic path or subdomain resolution, meaning WordPress can serve multiple sites from a single install. For that, it heavily relies on
ms-settings.php, which parses these headers to determine the current site context. If these headers are unavailable, multisite cannot function, but single-site mode can continue since it doesn’t need this resolution logic.
- Multisite mode introduces dynamic path or subdomain resolution, meaning WordPress can serve multiple sites from a single install. For that, it heavily relies on
In summary, the multisite setup introduces dependencies on server and network configurations that are unnecessary in a single-site setup. When these configurations are missing or incomplete, multisite-specific files like
ms-settings.phpandcanonical.phpgenerate errors, leading to 502 failures that wouldn’t appear in a single-site environment.Possible solution:
GCP environments often use proxy layers or load balancers, which may need specific settings to handle headers correctly.
Solution: In GCP Console, confirm thatX-Forwarded-Host,X-Forwarded-Proto, andHostheaders are properly forwarded. You may need to set up your web server to recognize and correctly handle these headers.Forum: Fixing WordPress
In reply to: multisite deployment fails, but no log file generatedOr a missing firewall rule or a mismatched protocol error? https://stackoverflow.com/questions/62744880/error-server-error-the-server-encountered-a-temporary-error-and-could-not-compl
Forum: Fixing WordPress
In reply to: multisite deployment fails, but no log file generatedIs this an existing WordPress install that you are trying to convert to Multisite? Or a new Multisite install? Can you share the URL?
Is this server error still happening?I tried to load the site. I received the following:Error: Server ErrorThe server encountered a temporary error and could not complete your request.Please try again in 30 seconds.I am unclear on how you could introduce a WordPress bug if you cannot load your site. Would you paste in the data from your debug.log?
Could you verify whether or not you see the front end of the site? Can you log into the backend?
But agreed, since it’s on Google Cloud it might be something specific to that configuration.
Forum: Fixing WordPress
In reply to: multisite deployment fails, but no log file generatedHi!
Looks like an error in your .httaccess (or someplace else) is keeping WordPress from loading; it never gets that far and so the debug log doesn’t get generated. The wp-debug log is only for errors from within the WordPress system.
Your .htaccess syntax checks out clean here: https://www.htaccesscheck.com/check.cgi but there may be some other issue with it – assume you only posted a snippet.
This might be helpful as well: https://www.hostknox.com/knowledgebase/529/How-to-enable-and-install-a-multisite-network-in-WordPress.htmlIt’s always a slog getting your first multisite set up!
Forum: Plugins
In reply to: [The Events Calendar: Category Colors] Category Colors Are Not SavingWe are having the same issue and it appears to be related to The Events Calendar 6.7.0 admin area restyle: https://theeventscalendar.com/blog/the-events-calendar-admin-settings-get-a-design-makeover/?utm_source=activecampaign-tec&utm_medium=email&utm_campaign=newsletter&utm_id=815
Maybe there is an unclosed tag in the update?Here’s a screenshot showing what it looks like: https://paste.pics/f81d836763ec3368f3ea90a95605a6b1
Rolling back to TEC 6.6.4.2 and TEC Pro 7.03 fixed the issue.
Thank you.
- This reply was modified 1 year, 7 months ago by bigtomato.
Forum: Plugins
In reply to: [The Events Calendar: Category Colors] Can’t get colors to displaymoved my comment to the correct topic here: https://ww.wp.xz.cn/support/topic/category-colors-are-not-saving/
- This reply was modified 1 year, 7 months ago by bigtomato. Reason: put comment on wrong topic
Forum: Plugins
In reply to: [WP Activity Log] Version 4.5 Fatal Error Multisite SensorHi Robert,
Yes, that’s correct, we use the pro version: https://neversettle.it/wp-cloner
(Looks like they just changed the product name to wp-cloner from ns-cloner).
thank you.
Forum: Plugins
In reply to: [WP Activity Log] Version 4.5 Fatal Error Multisite SensorHi Robert,
Thanks for your response. We use NS-Cloner to clone sites. The cloner works fine with your plugin for other functions, just not the cloning of a new site. It processes the first step – inserting a new blog record to wp-blogs – then dies. No tables are created or files transferred etc. Disabling the activity log plugin when we clone sites allows ns-cloner to complete with no errors.
Please let me know if you’d like more info etc.
Best,
-Jocelyn