Browser: Chrome
OS: Windows
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue (free tool: jam.dev)
running latest bricks theme and PHP 8.2 ( tried 8.0 too )
After uploading a code no matter how small, the code disappears and cannot edit the field. also happens in my onpage code/css sections
i have removed all plugins/custom code to troubleshoot and cant work it out
ON page load, you can see the code for a brief second than it disappears
oddly enoungh i checked another site and with completely different setup/hosting and it has same issue
Apparently this is known, thanks to Matt telling me, SOLVED: {wp_user_id} in Code Widget crashes it - #5 by MattHias but im still encountering the issue
my code was:
<?php // Assume that {mb_stay_rentals_room_regular_price} is a placeholder that is replaced by the actual value dynamically $rental_price = {mb_stay_rentals_room_regular_price}; // Check if rental price is set and is a valid number if (isset($rental_price) && is_numeric($rental_price)) { // Function to calculate rental price based on some logic function calculate_rental_price_function($base_price) { // Example calculation: apply a 10% discount $discount_rate = 0.90; // 10% discount $calculated_price = $base_price * $discount_rate; // Return the calculated price formatted to 2 decimal places return number_format($calculated_price, 2); } // Calculate the rental price using the function $calculated_rental_price = calculate_rental_price_function($rental_price); // Output the calculated rental price echo $calculated_rental_price; } else { // Handle the case where the rental price is not set or invalid echo "Price not available"; } ?>