alele
Forum Replies Created
-
Hello again,
I have one final, very precise update for your developers based on the nightly run results.
1. Confirmation: The TypeError is Resolved After applying the type cast
$str = (string) $str;in thewxr_cdatafunction, the Fatal TypeError in line 634 has completely disappeared from the logs of Instance A. This proves that the string-casting successfully handles the PHP 8.4 strict typing requirement and prevents the backup process from being interrupted at this stage.2. The Remaining Root Cause (Warning Analysis) While the fatal TypeError is now gone thanks to the fix, the logs show that the preceding warning remains:
WARNING: Attempt to read property "post_type" on nullThis warning was already present before the fix, but now that the crash is resolved, it confirms the underlying issue: earlier in the execution chain, the plugin attempts to access a post object that is already
null. This is the reason why anullvalue was being passed to thewxr_cdatafunction in the first place.3. Technical Conclusion for the Dev-Team:
- Immediate Safety: The type cast in
wxr_cdatais a necessary and effective safety net to ensure PHP 8.4 compatibility. - Structural Fix: There seems to be a missing null-check/object-validation while iterating through the posts in the legacy XML export module. The plugin should verify if the post object is valid (e.g.,
if ( ! is_object( $post ) ) continue;) before attempting to access$post->post_typeor passing content to the XML wrapper.
I am now confident that my backups are running safely again with the manual patch, but I look forward to an official release that includes these null-checks for the legacy WXR module.
Best regards,
Hello again,
Thank you for the update and for sharing the report with your developers.
I have further confirmation for you: I conducted a comparative test across two independent WordPress instances last night.
- Instance A (with my fix): The scheduled backup (Cron) ran perfectly without any errors.
- Instance B (original v5.6.9): The scheduled backup failed again with the same
TypeError.
This confirms that the proposed fix works perfectly for PHP 8.4 environments.
Interestingly, the error never occurs when triggering the job manually via the BackWPup dashboard. It only appears during the scheduled (Cron) execution, which seems to trigger the legacy XML export path more strictly.
For your developers, here is the exact location and the fix I applied to
inc/class-jobtype-wpexp.php(starting around line 628):PHP
private function wxr_cdata( $str ) { $str = (string) $str; // <--- This line fixes the PHP 8.4 TypeError // Use wp_is_valid_utf8() if available (WP 6.9+), otherwise fall back to seems_utf8(). if ( function_exists( 'wp_is_valid_utf8' ) ) { $is_valid_utf8 = wp_is_valid_utf8( $str ); // Line 634 (original) } else { $is_valid_utf8 = seems_utf8( $str ); } // ...By casting
$strto a string, we ensure thatwp_is_valid_utf8never receives anullvalue, which is what causes the fatal error in PHP 8.4.I hope this helps you to release a patch soon so I can revert my manual changes and return to the official version.
Best regards,
Hello @saranshwpm
Thank you for your feedback. To clarify: I am not 100% sure if these are legacy jobs, but the problem appeared immediately after the update to v5.6.9.
It is important to note that my environment (PHP 8.4.15) has been running stable for a longer time without any issues. The error only started occurring with this specific BackWPup version, which points to a regression in the new release.
I’ve analyzed the code at the crash site:
class-jobtype-wpexp.phpon line 634.The Analysis: In v5.6.9, the function
wxr_cdata($str)passes$strtowp_is_valid_utf8($str). If a database field (like an excerpt or meta value) returnsnull, PHP 8.4 throws a fatal TypeError.PHP
if ( function_exists( 'wp_is_valid_utf8' ) ) { $is_valid_utf8 = wp_is_valid_utf8( $str ); // Line 634 - Fatal here if $str is null }This explains why it worked before: Either the function call was different, or previous versions handled the type casting more gracefully.
Suggested Fix: Please add a simple type cast at the beginning of the
wxr_cdatafunction to ensure compatibility with PHP 8.4:$str = (string) $str;This should fix the issue for all users on modern PHP environments regardless of their job configuration. Could you please look into this for the next patch?
Thank You.
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] How to translate Buy Now button?We also have exactly the same problem.
I can confirm german translations are not working in firefox at all.
Tested in multiple browsers. It seems to work in Chrome and Edge. In Firefox always shows “Buy Now” instead of “Jetzt kaufen”.
We are now using old Paypal Standard method.
Thanks in advance.
Forum: Plugins
In reply to: [Cachify] empty cache for single articles at gutenberg editorHi @zodiac1978
What about adding this to the global settings like “Default action after saving a post” (clear post, clear all, clear nothing)?
In addition adding a “clear cache or this page” functionality to a submenu for the admin-bar icon (which currently clears the site cache) would also be nice.This would be great.
Thank you
AlexanderForum: Plugins
In reply to: [Ultimate Addons for Elementor] Choose a Templates with suitable widths?Hi,
Are those extra templates from your theme?
Yes exactly! I can only choose between the default template of my theme and the elementor carvas option.
see screenshot:
https://drive.google.com/file/d/1GPIoL44AZjSJOy-cesYxjGfMA77hZ_dA/view?usp=sharingI would like to use the (extra) templates from my thema as base for the Header/Footer template. But I can not select it on the right side (see screenshot)
- Immediate Safety: The type cast in